| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/01.evaluation_of_expressions/03.operator_precedence/ |
| D | unary.sts | 21 let i: int, b: boolean; 25 i = + t2 * t4; if (i != 8) return 1; 26 i = + + t2 * t4; if (i != 8) return 1; 27 i = - t2 * t4; if (i != -8) return 1; 28 i = - - t2 * t4; if (i != 8) return 1; 29 i = ~ t2 * t4; if (i != -12) return 1; 30 i = ~ ~ t2 * t4; if (i != 8) return 1; 31 i = + - t2 * t4; if (i != -8) return 1; 32 i = + ~ t2 * t4; if (i != -12) return 1; 33 i = - + t2 * t4; if (i != -8) return 1; [all …]
|
| /arkcompiler/ets_runtime/test/aottest/typedarrayfill/ |
| D | typedarrayfill.ts | 23 for (let i = 0; i < start; i++) { 24 if (arr[i] == 2) { 28 for (let i = start; i < end; i++) { 29 if (arr[i] != 2) { 33 for (let i = end; i < length; i++) { 34 if (arr[i] == 2) { 52 for (let i = 0; i < start; i++) { 53 if (arr[i] == 2) { 57 for (let i = start; i < end; i++) { 58 if (arr[i] != 2) { [all …]
|
| /arkcompiler/ets_runtime/test/aottest/loops/ |
| D | loops.ts | 18 for (var i:number = 0; i < 10; i++) { 20 if (i == j) { 21 print(i); 26 for (var i:number = 0; ; i++) { variable 27 if (i > 100) { 28 print(i); 33 for (var i:number = 0; i < 100; i++) { variable 34 if (i < 99) { 37 print(i); 40 var i:number = 0; variable [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/07.overloading_and_overriding/04.overloading_and_overriding_in_classes/ |
| D | instance_method_over_n2.params.yaml | 17 …- { base: "i: Number|undefined|null", derived: "i: undefined|Number|null", call: "undefined", res:… 18 - { base: "i: Number|undefined|null", derived: "i: undefined|null|Number", call: "null", res: 2 } 20 …- { base: "i: Number, j: number", derived: "i: number, k: Number", call: "new Number(), 1", res: 1… 21 …- { base: "i: Number, j: number", derived: "i: number, k: Number", call: "1, new Number()", res: 2… 25 - { base: "i: Number", derived: "i: Double", call: "new Number()", res: 2 } 26 - { base: "i: Number", derived: "i: Double", call: "new Double()", res: 2 } 27 - { base: "i: Double", derived: "i: Number", call: "new Number()", res: 2 } 28 - { base: "i: Double", derived: "i: Number", call: "new Double()", res: 2 } 30 - { base: "i: A", derived: "i: B", call: "new A()", res: 1 } 31 - { base: "i: A", derived: "i: B", call: "new B()", res: 2 } [all …]
|
| D | static_method_over_n2.params.yaml | 17 …- { base: "i: Number|undefined|null", derived: "i: undefined|Number|null", call: "undefined", res:… 18 - { base: "i: Number|undefined|null", derived: "i: undefined|null|Number", call: "null", res: 2 } 20 …- { base: "i: Number, j: number", derived: "i: number, k: Number", call: "new Number(), 1", res: 1… 21 …- { base: "i: Number, j: number", derived: "i: number, k: Number", call: "1, new Number()", res: 2… 25 - { base: "i: Number", derived: "i: Double", call: "new Number()", res: 2 } 26 - { base: "i: Number", derived: "i: Double", call: "new Double()", res: 2 } 27 - { base: "i: Double", derived: "i: Number", call: "new Number()", res: 2 } 28 - { base: "i: Double", derived: "i: Number", call: "new Double()", res: 2 } 30 - { base: "i: A", derived: "i: B", call: "new A()", res: 1 } 31 - { base: "i: A", derived: "i: B", call: "new B()", res: 2 } [all …]
|
| /arkcompiler/ets_runtime/test/perform/array/ |
| D | array_includes_indexof_jsperf.js | 35 for (let i = 0; i < fnNames.length; i++) { 36 print(`==== Array.prototype.${fnNames[i]} ====`); 37 const fnName = fnNames[i]; 45 for (let i = 0; i < array_size; ++i) array1[i] = i; 46 for (let i = 0; i < array_size; ++i) array2[i] = i * 0.9; 47 for (let i = 0; i < array_size; i++) array3[i] = `string.${i}`; 48 for (let i = 0; i < array_size; i++) array4[i] = { ["obj" + i]: i }; 51 for (let i = 0; i < arrays.length; i++) { 52 print(`ElementsKind of array${i + 1} = ${ArkTools.getElementsKind(arrays[i])}`); 55 addToResult(fnNames[i], 'int', (() => { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/03.variance/01.invariance/ |
| D | invariance_function.params.yaml | 21 i + i 28 i + i 35 i + i 42 i + i 49 i + i 56 i + i 63 i + i 70 i + i 77 i + i 84 i + i [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/checked/ |
| D | memory_coalescing2.sts | 109 for (let i: int = 0; i < v.length; i = i + 2) { 110 v[i] = t.i1; 111 v[i + 1] = t.i2 + 1; 123 for (let i: int = 0; i < v.length; i = i + 2) { 124 v[i] = t.i2; 125 v[i + 1] = t.f1 + 1; 137 for (let i: int = 0; i < v.length; i = i + 2) { 138 v[i] = t.f1; 139 v[i + 1] = t.f2 + 1; 151 for (let i: int = 0; i < v.length; i = i + 2) { [all …]
|
| D | memory_coalescing.sts | 73 for (let i: int = 0; i < v.length; i = i + 2) { 74 v[i] = t; 75 v[i + 1] = t + 1; 79 private static __noinline__fnMem(u: double[], v: double[], i: int): void { 80 u[i] = v[i]; 91 for (let i: int = 0; i < v.length; i = i + 2) { 92 v[i] = t; 93 Test.__noinline__fnMem(u, v, i); 94 v[i + 1] = t + 1; 107 for (let i: int = 0; i < v.length; i = i + 2) { [all …]
|
| D | memory_coalescing1.sts | 85 for (let i: int = 0; i < v.length; i = i + 2) { 86 v[i] = t.f; 87 v[i + 1] = t.g + 1; 91 private static __noinline__fnMem(u: double[], v: double[], i: int): void { 92 u[i] = v[i]; 105 for (let i: int = 0; i < v.length; i = i + 2) { 106 v[i] = t.f; 107 Test.__noinline__fnMem(u, v, i); 108 v[i + 1] = t.g + 1; 123 for (let i: int = 0; i < v.length; i = i + 2) { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/stdlib/std/core/ |
| D | Console.sts | 33 * @param i value to print 42 * @param i value to print 44 public native print(i: String): void 49 * @param i value to print 51 public native print(i: boolean): void 56 * @param i value to print 58 public native print(i: byte): void 63 * @param i value to print 65 public native print(i: short): void 70 * @param i value to print [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/std/time/ |
| D | DateConstructorTest.sts | 66 for(let i: int = 0; i < longYears.length; i++) { 68 let cd = new Date(longYears[i]); 71 if(cd.valueOf() as long != longYears[i]) failures++; 85 for(let i: int = 0; i < longYears.length; i++) { 86 let cd = new Date(longYears[i], md[i]); 87 let utc = Date.UTC(longYears[i], md[i]); 93 failures += checkDateWithLongYMD(cd, longYears[i], md[i], 1); 104 for(let i: int = 0; i < longYears.length; i++) { 105 let day: long = md[i] + 1; 106 let cd = new Date(longYears[i], md[i], day); [all …]
|
| /arkcompiler/ets_frontend/ets2panda/linter/test/main/ |
| D | for_stmts.sts | 49 for (const i in list) { 50 if (true) console.log(i); // "0", "1", "2", 53 for (const i of list) { 54 console.log(i); // 4, 5, 6 57 for (const i of [4, 5, 6]) { 58 console.log(i); // 4, 5, 6 75 for (const i in s) { 76 if (true) console.log(i); 85 let i: number, j: number, k: number; 87 for (i = 1, j = 2, k = 3; i * j * k > 0; i++, k--, j += 2) { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/09.classes/11.local_classes_and_interfaces/ |
| D | local_class_and_interface_declaration.params.yaml | 20 i: int = 1; 23 return new B().i; 36 i: int = 1; 39 return new B().i; 52 i: int = 1; 55 i: int = 2; 58 return new C().i; 64 return b.i + b.getInner(); 77 i: int = 1; 79 interface I { [all …]
|
| /arkcompiler/runtime_core/static_core/libpandabase/tests/ |
| D | arena_allocator_test.cpp | 96 for (size_t i = 0; i < ARRAY_SIZE; ++i) { in AllocateWithAlignment() local 97 arr[i] = static_cast<T *>(aa.Alloc(sizeof(T), align)); in AllocateWithAlignment() 98 *arr[i] = GetRand() % MaxValue<T>(); in AllocateWithAlignment() 103 for (size_t i = 0; i < ARRAY_SIZE; ++i) { in AllocateWithAlignment() local 104 ASSERT_NE(arr[i], nullptr) << "value of i: " << i << ", align: " << align; in AllocateWithAlignment() 105 …ASSERT_EQ(reinterpret_cast<size_t>(arr[i]) & mask, 0U) << "value of i: " << i << ", align: " << al… in AllocateWithAlignment() 106 … ASSERT_EQ(*arr[i], GetRand() % MaxValue<T>()) << "value of i: " << i << ", align: " << align; in AllocateWithAlignment() 120 for (size_t i = 0; i < ARRAY_SIZE; ++i) { in AllocateWithDiffAlignment() local 123 arr[i] = static_cast<T *>(aa.Alloc(sizeof(T), static_cast<Alignment>(randAlign))); in AllocateWithDiffAlignment() 124 *arr[i] = randomValue % MaxValue<T>(); in AllocateWithDiffAlignment() [all …]
|
| /arkcompiler/ets_runtime/test/aottest/builtins_array/ |
| D | builtins_array.ts | 51 for (var i = 0; i < 10; i++) { 59 for (let i = 0; i < 10; i++) array.push(i); 67 for (let i = 0; i < 10; i++) array.push(i); 73 for (let i = 0; i < 10; i++) array.push(i); 79 for (let i = 0; i < 10; i++) array.push(i); 80 for (let i = 0; i < 10; i++) { 88 for (let i = 0; i < 10; i++) array.push(i); 99 for (let i = 0; i < 5; i++) { 108 for (let i = 0; i < 10; i++) array.push(i); 109 for (let i = 0; i < 10; i++) { [all …]
|
| /arkcompiler/runtime_core/libpandabase/tests/ |
| D | arena_allocator_test.cpp | 88 for (size_t i = 0; i < ARRAY_SIZE; ++i) { in AllocateWithAlignment() local 89 arr[i] = static_cast<T *>(aa.Alloc(sizeof(T), align)); in AllocateWithAlignment() 90 *arr[i] = rand() % MAX_VALUE<T>(); in AllocateWithAlignment() 95 for (size_t i = 0; i < ARRAY_SIZE; ++i) { in AllocateWithAlignment() local 96 ASSERT_NE(arr[i], nullptr) << "value of i: " << i << ", align: " << align; in AllocateWithAlignment() 97 …ASSERT_EQ(reinterpret_cast<size_t>(arr[i]) & mask, 0U) << "value of i: " << i << ", align: " << al… in AllocateWithAlignment() 98 … ASSERT_EQ(*arr[i], rand() % MAX_VALUE<T>()) << "value of i: " << i << ", align: " << align; in AllocateWithAlignment() 112 for (size_t i = 0; i < ARRAY_SIZE; ++i) { in AllocateWithDiffAlignment() local 115 arr[i] = static_cast<T *>(aa.Alloc(sizeof(T), static_cast<Alignment>(rand_align))); in AllocateWithDiffAlignment() 116 *arr[i] = random_value % MAX_VALUE<T>(); in AllocateWithDiffAlignment() [all …]
|
| /arkcompiler/ets_frontend/ets2panda/test/parser/ets/ |
| D | binary_op.sts | 17 let i = 1; 37 let i01 = i & j; 38 let i02 = i ^ j; 39 let i03 = i | j; 40 let i04 = i & j ^ i & j | i ^ j; 43 let b07 = i != j; 44 let b08 = i == j; 49 let b12 = i < j; 50 let b13 = i > j; 51 let b14 = i <= j; [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_test_suite/containers/ |
| D | blocking_queue.sts | 25 let i = 1 27 i += j 29 return i 33 for (let i = 0; i < elementsNum; i++) { 36 testArrayInt[i] = el; 42 for (let i = 0; i < elementsNum; i++) { 45 testArrayObj[i] = el; 51 for (let i = 0; i < elementsNum; i++) { 53 if (i == 0) { 55 testArrayStr[i] = el; [all …]
|
| /arkcompiler/ets_runtime/test/moduletest/container/ |
| D | container_list.js | 29 for(let i = 0; i < 10; i++) { 30 list.add(i); 31 testArray.push(i); 41 for(let i = 0; i < 10; i++) { 42 list1.add(i) 43 testArray2.push(i); 56 for(let i = 0; i < testArray.length; i++) { 57 if (list[i] !== testArray[i]) { 66 for(let i = 0; i < testArray.length; i++) { 67 if (list[i] !== testArray[i]) { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_test_suite/intrinsics/ |
| D | string_indexof.sts | 28 * indexOf() without an explicitly specified position to start from (i.e. position is 0) 34 for (let i = 0; i < EscChars.getLength(); ++i) { 35 if (EscChars.indexOf(EscChars.charAt(i) as char) != i) { 39 for (let i = 0; i < RusChars.getLength(); ++i) { 40 if (RusChars.indexOf(RusChars.charAt(i) as char) != i) { 47 for (let i = 0; i < EngChars.getLength(); ++i) { 48 if (EngChars.indexOf(EngChars.charAt(i) as char) != i) { 55 for (let i = 0; i < DupChars.getLength(); ++i) { 56 if (DupChars.indexOf(DupChars.charAt(i) as char) != 0) { 60 for (let i = 0; i < DupChars.getLength(); ++i) { [all …]
|
| /arkcompiler/ets_runtime/test/aottest/inline_array_exception/ |
| D | inline_array_exception.ts | 28 for(let i = 0; i < 1; i++){ variable 34 for(let i = 0; i < 1; i++){ variable 40 for(let i = 0; i < 1; i++){ variable 46 for(let i = 0; i < 1; i++){ variable 52 for(let i = 0; i < 1; i++){ variable 58 for(let i = 0; i < 1; i++){ variable 64 for(let i = 0; i < 1; i++){ variable 70 for(let i = 0; i < 1; i++){ variable 76 for(let i = 0; i < 1; i++){ variable 82 for(let i = 0; i < 1; i++){ variable [all …]
|
| /arkcompiler/ets_runtime/test/perform/string/ |
| D | string.js | 19 for(var i = 0; i < 100000; ++i) { 32 for(var i = 0; i < 100000; ++i) { 45 for(var i = 0; i < 100000; ++i) { 56 for(var i = 0; i < 100000; ++i) { 67 for(var i = 0; i < 100000; ++i) { 79 for(var i = 0; i < 100000; ++i) { 91 for(var i = 0; i < 100000; ++i) { 103 for(var i = 0; i < 100000; ++i) { 114 for(var i = 0; i < 100000; ++i) { 125 for(var i = 0; i < 100000; ++i) { [all …]
|
| /arkcompiler/ets_runtime/test/moduletest/addelementinternal/ |
| D | addelementinternal.js | 25 for (let i = 0; i < 5; i++) { 26 arr1[i] = `value ${i}`; 27 arr2[i] = i + 1; 30 for (let i = 0; i < 5; i++) { 31 print(arr1[i]); 32 print(arr2[i]); 36 for (let i = 0; i < 5; i++) { 37 arr3[i] = `value ${i}`; 38 if (i ==3) delete arr3[i]; 40 for (let i = 0; i < 5; i++) { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/08.statements/07.while_statements_and_do_statements/ |
| D | do.params.yaml | 17 do i++; while (i < 10) 18 if (i == 10) return 0; 22 do res += "L"; while ((i += 2) < 7) 26 do {} while (++i < 10) 27 if (i == 10) return 0; 30 do do do i += 1; while (i < 3) while (i < 5) while (i < 7) 31 if (i == 7) return 0; 34 do { while (i < 7) i += 1 } while (i < 5) 35 if (i == 7) return 0; 39 let i: int = j; [all …]
|