| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/01.evaluation_of_expressions/03.operator_precedence/ |
| D | unary.ets | 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_func_tests/std/containers/linked_blocking_queue/ |
| D | LinkedBlockingQueue_AddTest.ets | 32 for (let i = 0; i < elementsNum; i++) { 33 assertEQ(queueInt.add(i), true); 41 for (let i = 0; i < elementsNum; i++) { 42 assertEQ(queueInt.add(i), true); 55 for (let i = 0; i < 5; i++) { 56 jobs[i] = launch<void, () => void>(queueAddData); 58 for (let i: int = 0; i < 5; i++) { 59 jobs[i].Await(); 70 for (let i = 0; i < 3; i++) { 74 for (let i: int = 0; i < 6; i++) { [all …]
|
| D | LinkedBlockingQueue_GetFirstTest.ets | 25 for (let i = 0; i < elementsNum; i++) { 26 assertEQ(queueInt.add(i), true); 36 for (let i = 0; i < elementsNum; i++) { 37 assertEQ(queueInt.add(i), true); 48 for (let i = 0; i < 10; i++) { 49 queueInt.add(i); 52 for (let i = 10; i < 20; i++) { 53 queueInt.push(i); 56 for (let i = 0; i < 10; i++) { 57 assertEQ(queueInt.size, 20 - i); [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 | 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 …]
|
| 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 …]
|
| /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_func_tests/std/containers/concurrent_hash_map/ |
| D | ConcurrentHashMap_MoreTypeTest.ets | 23 for (let i: int = 0; i < 10 ; i++) { 24 map.set(arrKeys[i], arrValues[i]); 33 for (let i = 0; i < 10; i++) { 34 let tf = (i % 2) == 0; 35 concurrentHashMap.set(i, tf); 38 for (let i = 0; i < 10; i++) { 39 assertEQ(concurrentHashMap.get(i), true); 40 i++; 42 for (let i = 1; i < 10; i++) { 43 assertEQ(concurrentHashMap.get(i), false); [all …]
|
| D | ConcurrentHashMap_ConstructorTest.ets | 21 for (let i: int = 0; i < 10 ; i++) { 22 map.set(arrKeys[i], arrValues[i]); 34 for (let i = 0; i < 10; i++) { 35 let arrKV: [Number, string] = [arrKeys[i], arrValues[i]] 36 array[i] = arrKV; 41 for (let i = 0; i < 10; i++) { 42 assertEQ(concurrentHashMap.get(arrKeys[i]), arrValues[i]); 48 for (let i: int = 0; i < 10 ; i++) { 49 let arrKV: [Number, string] = [arrKeys[i], arrValues[i]] 50 arr[i] = arrKV; [all …]
|
| /arkcompiler/runtime_core/taihe/test/ani_arraybuffer/user/ |
| D | main.ets | 25 for (let i = 0; i < numbersU8.length; i++) { 26 arrbuf1.set(i, numbersU8[i]); 39 for (let i = 0; i < getArrayBuffer.getByteLength(); i++) { 41 `getArrayBuffer Byte at index ${i}: ${getArrayBuffer.at(i)}`); 42 assertEQ(getArrayBuffer.at(i), 4) 51 for (let i = 0; i < numbers2.length; i++) { 52 arrbuf3.set(i, numbers2[i]); 59 for (let i = 0; i < doubleArrayBuffer.getByteLength(); i++) { 61 `doubleArrayBuffer Byte at index ${i}: ${doubleArrayBuffer.at(i)}`); 62 assertEQ(doubleArrayBuffer.at(i), numbers2[i] * 2) [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/std/time/ |
| D | DateConstructorTest.ets | 69 for(let i: int = 0; i < longYears.length; i++) { 70 let cd = new Date(longYears[i]); 71 assertEQ(cd.valueOf() as long, longYears[i]) 76 for(let i: int = 0; i < longYears.length; i++) { 77 let cd = new Date(longYears[i], longMonths[i]); 78 let utc = Date.UTC(longYears[i], longMonths[i]); 81 checkDateWithLongYMD(cd, valueLongYears[i], longMonths[i], 1) 86 for(let i: int = 0; i < longYears.length; i++) { 87 let day: long = longMonths[i] + 1; 88 let cd = new Date(longYears[i], longMonths[i], day); [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/checked/ |
| D | memory_coalescing2.ets | 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.ets | 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: FixedArray<double>, v: FixedArray<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 …]
|
| /arkcompiler/ets_frontend/ets2panda/linter/test/main/ |
| D | for_stmts.ets | 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/ets_frontend/ets2panda/test/parser/ets/ |
| D | binary_op.ets | 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/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/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/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_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_func_tests/std/containers/array_blocking_queue/ |
| D | ArrayBlockingQueue_PopTest.ets | 38 for (let i = 0; i < elementsNum; i++) { 39 assertEQ(testArrayStr[i], arrayToCheck[i]); 47 for (let i: int = 0; i < elementsNum; ++i) { 48 queueIntPop1.push(i); 58 for (let i: int = 0; i < elementsNum; ++i) { 59 queueIntPop2.push(i); 69 let i = queueIntPop2.pop(); 71 assertEQ(i, 10); 76 for (let i: int = 0; i < elementsNum; ++i) { 77 queueIntPopN.push(i); [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/05.generics/03.utility_types/03.readonly_utility_type/ |
| D | method_excluded_from_readonly.params.yaml | 18 i?: number = 0 22 let a: Readonly<AC> = { i: 1.1 } 27 i?: number = 0 31 let a: Readonly<C> = { i: 1.1 } 35 interface I { 36 i?: number 40 let a: Readonly<I> = { i: 1.1 } 44 interface I { 45 i?: number 48 class A implements I { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/05.generics/03.utility_types/01.partial_utility_type/ |
| D | method_excluded_from_partial.params.yaml | 18 i?: number = 0 22 let a: Partial<AC> = { i: 1.1 } 27 i?: number = 0 31 let a: Partial<C> = { i: 1.1 } 35 interface I { 36 i?: number 40 let a: Partial<I> = { i: 1.1 } 44 interface I { 45 i?: number 48 class A implements I { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-common-tests/intrinsics/ |
| D | string_indexof.ets | 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/runtime_core/static_core/plugins/ets/tests/ets_func_tests/std/containers/ |
| D | blocking_queue.ets | 27 let i = 1 29 i += j 31 return i 35 for (let i = 0; i < elementsNum; i++) { 38 testArrayInt[i] = el; 44 for (let i = 0; i < elementsNum; i++) { 47 testArrayObj[i] = el; 53 for (let i = 0; i < elementsNum; i++) { 55 if (i == 0) { 57 testArrayStr[i] = el; [all …]
|