• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//arkcompiler/ets_runtime/test/test_helper.gni")
15import("./automatedcases/typeinfer_failed_cases.gni")
16
17declare_args() {
18  is_enable_typeinfer_automatedcases = false
19}
20
21if (is_enable_typeinfer_automatedcases) {
22  ts_files = exec_script(rebase_path("./automatedcases/find_ts_files.py"),
23                         [
24                           "automatedcases",
25                           rebase_path("./automatedcases"),
26                         ],
27                         "list lines")
28
29  ts_files -= failed_list
30
31  foreach(file, ts_files) {
32    host_typeinfer_test_action(file) {
33      deps = []
34      is_enable_builtins_dts = true
35    }
36  }
37}
38
39group("ark_typeinfer_test") {
40  testonly = true
41
42  test_list = [
43    "add2dyn",
44    "assertTypeRules",
45    "binarysearch",
46    "bitwise_op",
47    "builtins",
48    "callarg0dyn",
49    "callarg1dyn",
50    "callargs2dyn",
51    "callargs3dyn",
52    "callirangedyn",
53    "callithisrange",
54    "callprimitivebuiltin",
55    "class",
56    "classwithproperty",
57    "createemptyarray",
58    "createemptyobject",
59    "createobjecthavingmethod",
60    "defineasyncfunc",
61    "defineclasswithbuffer",
62    "definefunctiondyn",
63    "definegeneratorfunc",
64    "div2dyn",
65    "getiterator",
66    "infergetterfunc",
67    "interface",
68    "ldboolean",
69    "ldglobalvar",
70    "ldinfinity",
71    "ldnan",
72    "ldnull",
73    "ldobjbyindex",
74    "ldobjbyname",
75    "ldobjbyvalue",
76    "ldsuperproperty",
77    "ldundefined",
78    "lex_env_var",
79    "lex_env_var_class",
80    "lex_env_var_duplication",
81    "lex_env_var_multiple",
82    "logic_op",
83    "loopbeginphi",
84    "mod2dyn",
85    "mul2dyn",
86    "newobjdynrange",
87    "parainfer",
88    "parainfer_class",
89    "phiwithloop",
90    "phiwithnumber",
91    "stconsttoglobalrecord",
92    "stglobalvar",
93    "stlettoglobalrecord",
94    "sub2dyn",
95    "supercall",
96    "superclass",
97    "throwdyn_1",
98    "throwdyn_2",
99    "tryldglobalbyname",
100    "trystglobalbyname",
101    "tsarraytobuiltin",
102    "typeof",
103    "variable_after_loops",
104  ]
105
106  deps = []
107  foreach(test, test_list) {
108    deps += [ "${test}:${test}Es2abcAotTypeInferAction" ]
109  }
110
111  deps += [ "module_test:ark_typeinfer_module_test" ]
112  deps += [ "es2abc_feature:ark_typeinfer_es2abc_feature_test" ]
113
114  if (is_enable_typeinfer_automatedcases) {
115    foreach(file, ts_files) {
116      deps += [ ":${file}Es2abcAotTypeInferAction" ]
117    }
118  }
119}
120