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