| /arkcompiler/ets_frontend/ets2panda/test/runtime/ets/ |
| D | array-object.sts | 17 let arr1: Int[] = [1,2,3,4,5]; 19 let object_array: Object[] = arr1 as Object[]; 20 let object: Object = arr1 as Object; 23 // arr1.toString(); 30 // arr1.$_hashCode(); 36 assert(arr1 == arr1); 37 assert(arr1 == object_array); 38 assert(arr1 == object); 39 assert(arr1 != arr2);
|
| /arkcompiler/runtime_core/static_core/tests/cts-generator/cts-template/ |
| D | lda.const.yaml | 42 lda.const v0, arr1 45 - values: ['.array arr1'] 46 - values: ['.array arr1 i32'] 47 - values: ['.array arr1 i32 4'] 50 - values: ['.array arr1 i32 4 { }'] 51 - values: ['.array arr1 i32 4 { 1 }'] 52 - values: ['.array arr1 i32 4 { 1 2 3 4 5 }'] 53 - values: ['.array arr1 i32 0 { }'] 54 - values: ['.array arr1 i32[] 1 { 1 }'] 55 - values: ['.array arr1 panda.String 1 { }'] [all …]
|
| /arkcompiler/runtime_core/tests/cts-generator/cts-template/ |
| D | lda.const.yaml | 42 lda.const v0, arr1 45 - values: ['.array arr1'] 46 - values: ['.array arr1 i32'] 47 - values: ['.array arr1 i32 4'] 50 - values: ['.array arr1 i32 4 { }'] 51 - values: ['.array arr1 i32 4 { 1 }'] 52 - values: ['.array arr1 i32 4 { 1 2 3 4 5 }'] 53 - values: ['.array arr1 i32 0 { }'] 54 - values: ['.array arr1 i32[] 1 { 1 }'] 55 - values: ['.array arr1 panda.String 1 { }'] [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/escompat/array_js_suites/ |
| D | test_splice.js | 51 let arr1 = CreateEtsSample(); variable 52 arr1.push('spliced'); 53 ASSERT_EQ(etsArrLen(arr1), EXPECT_3); 56 arr1.splice(1); 57 ASSERT_EQ(arr1.at(0), 123); 58 ASSERT_EQ(arr1.length, 1);
|
| D | test_to_spliced.js | 46 let arr1 = CreateEtsSample(); variable 47 arr1.push('spliced'); 48 ASSERT_EQ(etsArrLen(arr1), EXPECT_3);
|
| /arkcompiler/ets_runtime/test/moduletest/arrayfindlast/ |
| D | arrayfindlast.js | 79 let arr1 = [1, 2, , 7, , undefined]; variable 80 arr1.__proto__.push(9); 81 arr1.__proto__.push(9); 82 arr1.__proto__.push(9); 86 print(arr1.findLast(fun1)); 87 arr1.__proto__.pop(9); 88 arr1.__proto__.pop(9); 89 arr1.__proto__.pop(9);
|
| /arkcompiler/ets_frontend/arkguard/test/ut/utils/ |
| D | ListUtil.spec.ts | 81 let arr1 = undefined; variable 84 const arrUnique = ListUtil.uniqueMergeList(arr1, arr2); 89 let arr1 = ['1', '2', '3']; variable 94 const arrUnique = ListUtil.uniqueMergeList(arr1, arr2); 102 let arr1 = ['1', '2', '3', '4']; variable 107 const arrUnique = ListUtil.uniqueMergeList(arr1, arr2); 115 let arr1 = undefined; variable 119 const arrUnique = ListUtil.uniqueMergeList(arr1, arr2, arr3); 124 let arr1 = ['1', '2', '3']; variable 130 const arrUnique = ListUtil.uniqueMergeList(arr1, arr2, arr3); [all …]
|
| /arkcompiler/ets_runtime/test/aottest/builtin_inlining/Array/FindFindIndex/ |
| D | builtinArrayFindFindIndex.ts | 132 let arr1 = [1, 2] 138 print(arr1.find(x => x == 1)); //: 1 144 let arr1 = [1, 2] 150 print(arr1.findIndex(x => x == 1)); //: 0 160 let arr1 = [1, 2] 170 print(arr1.find(x => x == 1)); //: 1 175 let arr1 = [1, 2] 185 print(arr1.findIndex(x => x == 1)); //: 0 230 let arr1 = [1, 2] 240 print(arr1.find(x => x == 1)); //: 1 [all …]
|
| /arkcompiler/ets_runtime/test/aottest/typedarray_load_store/ |
| D | typedarray_load_store.ts | 60 let arr1 = new Int32Array(buffer, 20, 4); variable 62 IntegerArray(arr1); 64 …dArray constructed from ArrayBuffer with byteOffset = 28 and length = 5, intersecting with arr1. */ 107 let arr1 = new Float64Array(buffer, 16, 4); variable 109 FloatArray(arr1); 111 …dArray constructed from ArrayBuffer with byteOffset = 24 and length = 5, intersecting with arr1. */ 116 …onstructed from ArrayBuffer with byteOffset = 0 and length = 5, intersecting with arr1 and arr2. */
|
| /arkcompiler/ets_frontend/arkguard/test/grammar/array_validation/ |
| D | readonly_array.ts | 21 let arr1 = arr as number[]; variable 23 arr1[0] = 0; 25 assert(arr1[0] === 0, 'success');
|
| D | array_every.ts | 20 let arr1 = arr.every( variable 26 assert(arr1 === true, 'success');
|
| D | array_some.ts | 20 let arr1 = arr.some(function (value) { variable 24 assert(arr1 === true, 'success');
|
| D | array_expanding.ts | 18 var arr1 = [1, 2, 3]; variable 20 var arr3 = [...arr1, ...arr2]
|
| D | array_map.ts | 20 let arr1 = arr.map(function (value) { variable 25 assert(value * 2 + 1 === arr1[index], 'success');
|
| /arkcompiler/ets_runtime/test/moduletest/arrayjoin/ |
| D | arrayjoin.js | 34 var arr1 = [1]; 35 arr1.push(arr1); 36 arr1.push(arr1); 37 print(arr1.toString()); 38 print(arr1.toString());
|
| /arkcompiler/ets_runtime/test/moduletest/typearray/ |
| D | typearray.js | 526 let arr1 = new ctor([1, 2, 3, 4, 5]); 527 arr1.reverse(); 529 if (arr1.length !== arr2.length) return false; 530 for (let i = 0; i < arr1.length; i++) { 531 if (arr1[i] !== arr2[i]) return false; 548 let arr1 = new ctor([1n, 2n, 3n, 4n, 5n]); 549 arr1.reverse(); 551 if (arr1.length !== arr2.length) return false; 552 for (let i = 0; i < arr1.length; i++) { 553 if (arr1[i] !== arr2[i]) return false; [all …]
|
| /arkcompiler/ets_runtime/test/aottest/builtin_inlining/Array/Pop/ |
| D | builtinArrayPop.ts | 112 let arr1 = [1, 2] 118 print(arr1.pop()); //: 2 127 let arr1 = [1, 2] 137 print(arr1.pop(1)); //: 2 163 let arr1 = [1, 2] 173 print(arr1.pop(1)); //: 2 181 let arr1 = [1, 2] 187 print(arr1.pop(1)); //: 1
|
| /arkcompiler/ets_runtime/test/aottest/builtin_inlining/Array/ForEach/ |
| D | builtinArrayForEach.ts | 105 let arr1 = [1, 2] 111 print(arr1.forEach(x => x == 1)); //: undefined 120 let arr1 = [1, 2] 130 print(arr1.forEach(x => x == 1)); //: undefined 156 let arr1 = [1, 2] 166 print(arr1.forEach(x => x == 1)); //: undefined 175 let arr1 = [1, 2] 181 print(arr1.forEach(x => x == 1)); //: undefined
|
| /arkcompiler/ets_runtime/test/aottest/builtin_inlining/Array/Filter/ |
| D | builtinArrayFilter.ts | 98 let arr1 = [1, 2] 104 print(arr1.filter(x => x == 1)); //: 1 113 let arr1 = [1, 2] 123 print(arr1.filter(x => x == 1)); //: 1 149 let arr1 = [1, 2] 159 print(arr1.filter(x => x == 1)); //: 1 168 let arr1 = [1, 2] 175 print(arr1.filter(x => x == 1)); //: true
|
| /arkcompiler/ets_runtime/test/moduletest/objecthasownproperty/ |
| D | objecthasownproperty.js | 57 var arr1 = new Array(4); variable 58 print(arr1.new1); 59 print(arr1.hasOwnProperty("0")); 60 print(arr1.hasOwnProperty("new1"));
|
| /arkcompiler/ets_runtime/test/moduletest/addelementinternal/ |
| D | addelementinternal.js | 22 let arr1 = {x:1,y:3}; variable 26 arr1[i] = `value ${i}`; 31 print(arr1[i]);
|
| /arkcompiler/ets_runtime/test/moduletest/arraysort/ |
| D | arraysort.js | 64 let arr1 = [1, 3, 2]; variable 65 arr1.sort((a, b) => { 68 print(JSON.stringify(arr1)); 76 arr1[i] = i; 78 arr1[0] = 99; 79 arr1[99] = 0; 80 arr1[49] = 50; 81 arr1[50] = 49; 82 arr1.sort((a, b) => { 85 print(JSON.stringify(arr1));
|
| /arkcompiler/ets_runtime/test/aottest/retype_test/ |
| D | retype_test.ts | 17 const arr1 = new Uint8Array(1) constant 26 arr1.set(v1)
|
| /arkcompiler/ets_frontend/ets2panda/linter/test/ |
| D | indexed_derived_from_array.sts | 19 let arr1 = new ObservedArray<number>(1, 2, 3) 20 console.log(arr1[0]) 21 console.log(arr1[nextId])
|
| D | array_literal_spread.sts | 19 let arr1 = [1, 2, 3]; 23 let arr4 = [...arr1, 10, ...arr2, 11, ...arr3]
|