• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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
14group("ark_js_moduletest") {
15  testonly = true
16  test_list = [
17    "addelementinternal",
18    "allocatearraybuffer",
19    "array",
20    "arrayfindlast",
21    "arrayflat",
22    "arrayflatmap",
23    "arrayfindindex",
24    "arrayfindlastindex",
25    "arrayforeach",
26    "arrayfrom",
27    "arrayjoin",
28    "arraymap",
29    "arraypop",
30    "arraytoreversed",
31    "arraytospliced",
32    "arraywith",
33    "arraysort",
34    "arrayspread",
35    "arrayprotochange",
36    "arrayshift",
37    "arrayslice",
38    "arraysplice",
39    "arktoolsgetundetectable",
40    "arktoolshavesamemap",
41    "assignproxy",
42    "async",
43    "asyncgenerator",
44    "barrier",
45    "bigint",
46    "bindfunction",
47    "bitwiseop",
48    "builtins",
49    "callframe",
50    "calltype",
51    "changelistener",
52    "class",
53    "clampedarray",
54    "compareobjecthclass",
55    "concurrent",
56    "container",
57    "createarray",
58    "createobject",
59    "dataproperty",
60    "datecase",
61    "datecompare",
62    "dateparse",
63    "decodeuricomponent",
64    "definefield",
65    "definefunc",
66    "deleteobjproperty",
67    "div",
68    "dynamicimport",
69    "dyninstruction",
70    "ecmastringtable",
71    "equal",
72    "errorhelper",
73    "errorcause",
74    "flatten",
75    "forawaitof",
76    "forin",
77    "forin_delete_property",
78    "forin_dictionary_mode",
79    "forin_empty_prototype",
80    "forin_enum_cache",
81    "forin_non_empty_prototype",
82    "forin_primitive",
83    "forin_special_object",
84    "fortest",
85    "funcprotochangeobjectandnew",
86    "functionapply",
87    "generator",
88    "getpropertybyindex",
89    "getunmappedargs",
90    "global",
91    "globalaccessor",
92    "globalrecord",
93    "globalthis",
94    "helloworld",
95    "instanceofic",
96    "intl",
97    "jsonparser",
98    "jsonstringifier",
99    "ldmodulensbyic",
100    "lexicalenv",
101    "linkedhashtable",
102    "loadicbyname",
103    "loadicbyvalue",
104    "localelowercase",
105    "mapforeach",
106    "mapget",
107    "memleakobjectcreate",
108    "merge",
109    "module",
110    "moduleImportJson",
111    "moduleLazyImport",
112    "moduleUseCjs",
113    "multiargs",
114    "multiprotoic",
115    "negintmin",
116    "newobjdynrange",
117    "object",
118    "objectcloneproperties",
119    "objectgetownproperty",
120    "objecthasownproperty",
121    "objectkeys",
122    "objoperate",
123    "objseal",
124    "promise",
125    "propertydetector",
126    "protobuf",
127    "proxy",
128    "regressproxy",
129    "rangeerror",
130    "regexpcallthrow",
131    "regexpflagd",
132    "regexpmaxindex",
133    "regress",
134    "regressmathmaxmin",
135
136    #"regressdatetime",
137    "regressdefineproperty",
138    "regresssstring",
139    "require",
140    "setobjectwithproto",
141    "spreadoperator",
142    "stackoverflow",
143    "storeglobalvarIC",
144    "storeicbyname",
145    "storeicbyvalue",
146    "string",
147    "stringfromcharcode",
148    "stringlocalecompare",
149    "stringreplace",
150    "stringreplaceall",
151    "stringsplit",
152    "stubbuilder",
153    "throwdyn",
154    "throwerror",
155    "trycatch",
156    "typearray",
157    "typedarrayat",
158    "typedarrayfill",
159    "typedarrayfindlast",
160    "typedarrayfrom",
161    "typedarraynan",
162    "typedarraysort",
163    "typedarraysubarray",
164    "typedarraytosorted",
165    "typedarraywith",
166    "typedarrayjoin",
167    "watch",
168    "weakcollectionswithsymbol",
169    "wrapperclassfunc",
170    "yieldstar",
171    "esmnestedimportcjs",
172    "regexp",
173    "deregistermodule",
174    "getpropertybyic",
175    "regressbufferdetach",
176    "regressdate",
177    "regresssuper",
178    "objectfreeze",
179    "sharedcheck",
180    "sharedarray",
181    "sharedtypedarray",
182    "sharedcollectionsexception",
183    "definesendableclass",
184    "sendableenv",
185    "sendablefunc",
186    "sendablecontext",
187    "sendableclassuseimport",
188    "sharedmodule",
189    "sharedset",
190    "sharedmap",
191    "sharedJSON",
192    "sharedic",
193    "sendable",
194  ]
195
196  deps = []
197  foreach(test, test_list) {
198    deps += [ "${test}:${test}Action" ]
199    if (!is_debug) {
200      deps += [ "${test}:${test}ContextAction" ]
201    }
202  }
203
204  if (!is_debug) {
205    release_test_list = [
206      "multiconstpoolclass",
207      "multiconstpoolconstructor",
208      "multiconstpoolfunc",
209      "multiconstpoolobj",
210      "typedarrayrelease",
211    ]
212
213    foreach(test, release_test_list) {
214      deps += [
215        "${test}:${test}Action",
216        "${test}:${test}ContextAction",
217      ]
218    }
219  }
220}
221
222group("ark_js_assert_moduletest") {
223  testonly = true
224  assert_test_list = [ "addpropertybyname" ]
225
226  deps = []
227  foreach(test, assert_test_list) {
228    deps += [ "${test}:${test}AssertAction" ]
229    if (!is_debug) {
230      deps += [ "${test}:${test}ContextAssertAction" ]
231    }
232  }
233
234  if (!is_debug) {
235    release_test_assert_list = [
236      "hugearray",
237      "hugeictest",
238      "multiconstpoolarray",
239    ]
240
241    foreach(test, release_test_assert_list) {
242      deps += [
243        "${test}:${test}AssertAction",
244        "${test}:${test}ContextAssertAction",
245      ]
246    }
247  }
248}
249
250group("ark_asm_test") {
251  testonly = true
252  test_list = [
253    "addelementinternal",
254    "allocatearraybuffer",
255    "allocatesizeoverflow",
256    "array",
257    "arrayfindlast",
258    "arrayfill",
259    "arrayflat",
260    "arrayflatmap",
261    "arrayfindlastindex",
262    "arrayfindindex",
263    "arrayforeach",
264    "arrayjoin",
265    "arraymap",
266    "arraypop",
267    "arraysort",
268    "arrayspread",
269    "arrayprotochange",
270    "arrayshift",
271    "arrayslice",
272    "assignproxy",
273    "barrier",
274    "bigint",
275    "bindfunction",
276    "bitwiseop",
277    "builtins",
278    "callframe",
279    "calltype",
280    "changelistener",
281    "class",
282    "compareobjecthclass",
283    "concurrent",
284    "container",
285    "createobject",
286    "dataproperty",
287    "dateparse",
288    "datetimezone",
289
290    # "datetimezonetitleid",
291    "decodeuricomponent",
292    "definefield",
293    "definefunc",
294    "deleteobjproperty",
295    "div",
296    "dynamicimport",
297    "dyninstruction",
298    "ecmastringtable",
299    "elements_kind",
300    "equal",
301    "errorcause",
302    "flatten",
303    "forin",
304    "forin_delete_property",
305    "forin_dictionary_mode",
306    "forin_empty_prototype",
307    "forin_enum_cache",
308    "forin_non_empty_prototype",
309    "forin_primitive",
310    "forin_special_object",
311    "fortest",
312    "funcprotochangeobjectandnew",
313    "functionapply",
314    "generator",
315    "getunmappedargs",
316    "global",
317    "globalaccessor",
318    "globalrecord",
319    "globalthis",
320    "helloworld",
321    "ictest",
322    "instanceofic",
323    "intl",
324    "jsonparser",
325    "jsonstringifier",
326    "ldmodulensbyic",
327    "lexicalenv",
328    "linkedhashtable",
329    "loadicbyvalue",
330    "mapforeach",
331    "mapget",
332    "module",
333    "multiargs",
334    "multiprotoic",
335    "negintmin",
336    "newobjdynrange",
337    "number",
338    "objectcloneproperties",
339    "objectdefineproperties",
340    "objecthasownproperty",
341    "objectkeys",
342    "objoperate",
343    "objseal",
344    "promise",
345    "propertydetector",
346    "proxy",
347    "rangeerror",
348    "regexpcallthrow",
349    "regexpflagd",
350    "regressparseInt",
351    "setobjectwithproto",
352    "spreadoperator",
353    "stackoverflow",
354    "string",
355    "stringreplace",
356    "stringreplaceall",
357    "stringrepeat",
358    "stringsplit",
359    "stubbuilder",
360    "throwdyn",
361    "throwerror",
362    "trycatch",
363    "typedarrayat",
364    "typedarrayfill",
365    "typedarrayfindlast",
366    "typedarrayfrom",
367    "typedarraynan",
368    "typedarraysort",
369    "typedarraytosorted",
370    "typedarraywith",
371    "watch",
372    "weakcollectionswithsymbol",
373    "wrapperclassfunc",
374    "yieldstar",
375    "regexp",
376    "deregistermodule",
377    "getpropertybyic",
378    "sharedcheck",
379    "sharedarray",
380    "sharedtypedarray",
381    "sharedcollectionsexception",
382    "definesendableclass",
383    "sendableenv",
384    "sendablefunc",
385    "sendablecontext",
386    "sendableclassuseimport",
387    "sharedmodule",
388    "sharedset",
389    "sharedmap",
390    "sharedJSON",
391    "sharedic",
392    "sendable",
393  ]
394
395  deps = []
396  foreach(test, test_list) {
397    deps += [ "${test}:${test}AsmAction" ]
398    if (!is_debug) {
399      deps += [ "${test}:${test}AsmContextAction" ]
400    }
401  }
402
403  if (!is_debug) {
404    release_test_list = [
405      "asmstackoverflow",
406      "arrayRelease",
407      "supercallRelease",
408      "multiconstpoolclass",
409      "multiconstpoolconstructor",
410      "multiconstpoolfunc",
411      "multiconstpoolobj",
412      "typedarrayrelease",
413    ]
414
415    foreach(test, release_test_list) {
416      deps += [
417        "${test}:${test}AsmAction",
418        "${test}:${test}AsmContextAction",
419      ]
420    }
421  }
422}
423
424group("ark_asm_assert_test") {
425  testonly = true
426  assert_test_list = [ "addpropertybyname" ]
427  deps = []
428
429  foreach(test, assert_test_list) {
430    deps += [ "${test}:${test}AsmAssertAction" ]
431    if (!is_debug) {
432      deps += [ "${test}:${test}AsmContextAssertAction" ]
433    }
434  }
435
436  if (!is_debug) {
437    release_test_assert_list = [
438      "hugearray",
439      "hugeictest",
440      "multiconstpoolarray",
441    ]
442
443    foreach(test, release_test_assert_list) {
444      deps += [
445        "${test}:${test}AsmAssertAction",
446        "${test}:${test}AsmContextAssertAction",
447      ]
448    }
449  }
450}
451
452group("ark_asm_single_step_test") {
453  testonly = true
454  test_list = [
455    "addelementinternal",
456    "allocatearraybuffer",
457    "allocatesizeoverflow",
458    "arrayfindindex",
459    "arrayfindlast",
460    "arrayflat",
461    "arrayflatmap",
462    "arrayfindlastindex",
463    "arrayforeach",
464    "arrayjoin",
465    "arraymap",
466    "arraypop",
467    "arrayprotochange",
468    "arrayshift",
469    "arrayslice",
470    "arrayspread",
471    "assignproxy",
472    "barrier",
473    "bigint",
474    "bindfunction",
475    "bitwiseop",
476    "callframe",
477    "calltype",
478    "changelistener",
479    "class",
480    "compareobjecthclass",
481    "concurrent",
482    "container",
483    "createobject",
484    "dataproperty",
485    "decodeuricomponent",
486    "definefield",
487    "dynamicimport",
488    "dyninstruction",
489    "ecmastringtable",
490    "errorcause",
491    "forin",
492    "forin_delete_property",
493    "forin_dictionary_mode",
494    "forin_empty_prototype",
495    "forin_enum_cache",
496    "forin_non_empty_prototype",
497    "forin_primitive",
498    "forin_special_object",
499    "fortest",
500    "funcprotochangeobjectandnew",
501    "functionapply",
502    "generator",
503    "getunmappedargs",
504    "global",
505    "globalaccessor",
506    "globalrecord",
507    "globalthis",
508    "helloworld",
509    "instanceofic",
510    "jsonparser",
511    "jsonstringifier",
512    "ldmodulensbyic",
513    "lexicalenv",
514    "loadicbyvalue",
515    "mapforeach",
516    "mapget",
517    "module",
518    "multiargs",
519    "multiprotoic",
520    "negintmin",
521    "newobjdynrange",
522    "objectcloneproperties",
523    "objecthasownproperty",
524    "objectkeys",
525    "objoperate",
526    "objseal",
527    "promise",
528    "propertydetector",
529    "proxy",
530    "rangeerror",
531    "regexpcallthrow",
532    "regexpflagd",
533    "setobjectwithproto",
534    "spreadoperator",
535    "stackoverflow",
536    "string",
537    "stringreplace",
538    "stringreplaceall",
539    "stringsplit",
540    "stubbuilder",
541    "throwdyn",
542    "throwerror",
543    "trycatch",
544    "typedarrayat",
545    "typedarrayfill",
546    "typedarrayfindlast",
547    "typedarrayfrom",
548    "typedarraynan",
549    "typedarraysort",
550    "typedarraytosorted",
551    "typedarraywith",
552    "watch",
553    "weakcollectionswithsymbol",
554    "yieldstar",
555    "getpropertybyic",
556    "regressarraybuffer",
557    "sharedcheck",
558    "sharedarray",
559    "sharedtypedarray",
560    "sharedcollectionsexception",
561    "definesendableclass",
562    "sendableenv",
563    "sendablefunc",
564    "sendablecontext",
565    "sendableclassuseimport",
566    "sharedmodule",
567    "sharedic",
568    "sharedset",
569    "sharedmap",
570    "sharedJSON",
571    "sendable",
572  ]
573
574  deps = []
575  foreach(test, test_list) {
576    deps += [ "${test}:${test}AsmSingleStepAction" ]
577    if (!is_debug) {
578      deps += [ "${test}:${test}AsmSingleStepContextAction" ]
579    }
580  }
581  if (!is_debug) {
582    release_test_list = [
583      "asmstackoverflow",
584      "arrayRelease",
585      "supercallRelease",
586      "multiconstpoolclass",
587      "multiconstpoolconstructor",
588      "multiconstpoolfunc",
589      "multiconstpoolobj",
590      "typedarrayrelease",
591    ]
592
593    foreach(test, release_test_list) {
594      deps += [
595        "${test}:${test}AsmSingleStepAction",
596        "${test}:${test}AsmSingleStepContextAction",
597      ]
598    }
599  }
600}
601
602group("ark_asm_single_step_assert_test") {
603  testonly = true
604  assert_test_list = [ "addpropertybyname" ]
605
606  deps = []
607  foreach(test, assert_test_list) {
608    deps += [ "${test}:${test}AsmSingleStepAssertAction" ]
609    if (!is_debug) {
610      deps += [ "${test}:${test}AsmSingleStepContextAssertAction" ]
611    }
612  }
613  if (!is_debug) {
614    release_test_assert_list = [ "multiconstpoolarray" ]
615
616    foreach(test, release_test_assert_list) {
617      deps += [
618        "${test}:${test}AsmSingleStepAssertAction",
619        "${test}:${test}AsmSingleStepContextAssertAction",
620      ]
621    }
622  }
623}
624