Home
last modified time | relevance | path

Searched +full:2 +full:i (Results 1 – 25 of 645) sorted by relevance

12345678910>>...26

/arkcompiler/ets_runtime/test/moduletest/container/
Dcontainer_vector.js36 vector.insert(2, 2);
38 map.set("test get(index is 2):", vector.get(2) == 2);
41 map.set("test getIndexOf(target is 2):", vector.getIndexOf(2) !== 5); // false
50 vec.set(2, 8);
51 map.set("test set:", vec.get(2) == 8 && vec.length == 6);
62 return (item = 2 * item);
70 for (let i = 0; i < vector.length; i++) {
71 map.set("for of " + arr[i], vec.get(i) == arr[i]);
87 for(let i = 0; i<10; i++) {
88 proxy.add(i)
[all …]
Dcontainer_plainarray.js29 let testArray = ["0", "1", "2", "3", "4", "5"]
33 proxy.add(2, "2")
38 for(let i = 0; i < testArray.length; i++) {
39 if (proxy[i] !== testArray[i]) {
45 map.set("test plainarray has:", proxy.has(2))
49 map.set("test plainarray getValueAt:", proxy.getValueAt(2) === "2")
53 for(let i = 0; i < testArray.length; i++) {
54 if (newPlainArray[i] !== testArray[i]) {
64 proxy.removeAt(2)
65 testArray.splice(2, 1)
[all …]
Dcontainer_arraylist.js27 arr.add(2);
39 for (let i = 0; i < arr.length; i++) {
40 if (arr[i] != (i + 1)) {
51 for(let i = 0; i < 10; i++) {
52 proxy.add(i)
53 testArray.push(i)
56 for(let i = 0; i < testArray.length; i++) {
57 if (proxy[i] !== testArray[i]) {
63 map.set("test arraylist has:", proxy.has(2))
70 for(let i = 0; i < testArray.length; i++) {
[all …]
/arkcompiler/runtime_core/compiler/tests/
Dreg_alloc_interference_graph_test.cpp27 unsigned test_edges1[2][2] = {{0, 1}, {7, 4}};
29 for (int i = 0; i < 2; i++) { in __anon92a0531b0202() local
30 …if ((a == test_edges1[i][0] && b == test_edges1[i][1]) || (b == test_edges1[i][0] && a == test_edg… in __anon92a0531b0202()
44 for (unsigned i = 0; i < DEFAULT_CAPACITY1; i++) { in TEST_F() local
46 ASSERT_EQ(matrix.HasEdge(i, j), IsInSet(i, j)); in TEST_F()
58 for (unsigned i = 0; i < DEFAULT_CAPACITY1; i++) { in TEST_F() local
60 EXPECT_EQ(matrix.HasAffinityEdge(i, j), IsInSet(i, j)); in TEST_F()
77 EXPECT_EQ(gr.Size(), 2); in TEST_F()
101 gr.AddEdge(1, 2); in TEST_F()
104 gr.AddEdge(0, 2); in TEST_F()
[all …]
Dinst_test.cpp33 * [2] in TEST_F()
46 * PHI(1,2,4) in TEST_F()
54 BASIC_BLOCK(2, 3, 4) in TEST_F()
56 INST(2, Opcode::Add).u64().Inputs(0, 1); in TEST_F()
72 INST(7, Opcode::Sub).u64().Inputs(3, 2); in TEST_F()
87 ASSERT_TRUE(CheckUsers(INS(0), {2, 3, 8, 11})); in TEST_F()
88 ASSERT_TRUE(CheckUsers(INS(1), {2, 4, 8, 11})); in TEST_F()
89 ASSERT_TRUE(CheckUsers(INS(2), {7})); in TEST_F()
93 ASSERT_TRUE(CheckInputs(INS(2), {0, 1})); in TEST_F()
95 ASSERT_TRUE(CheckInputs(INS(7), {3, 2})); in TEST_F()
[all …]
Dgraph_cloner_test.cpp38 CONSTANT(2, 10); // len_array in TEST_F()
40 BASIC_BLOCK(2, 3, 6) in TEST_F()
43 INST(3, Opcode::NewArray).ref().Inputs(44, 2); in TEST_F()
44 INST(14, Opcode::Compare).CC(ConditionCode::CC_LT).b().Inputs(0, 13); // i < X in TEST_F()
50 INST(7, Opcode::SaveState).Inputs(0, 1, 2, 3).SrcVregs({0, 1, 2, 3}); in TEST_F()
51 INST(8, Opcode::BoundsCheck).s32().Inputs(2, 4, 7); in TEST_F()
52 INST(9, Opcode::StoreArray).s32().Inputs(3, 8, 0); // a[i] = 0 in TEST_F()
53 INST(10, Opcode::Add).s32().Inputs(4, 1); // i++ in TEST_F()
54 INST(5, Opcode::Compare).CC(ConditionCode::CC_LT).b().Inputs(10, 13); // i < X in TEST_F()
70 CONSTANT(2, 10); // len_array in TEST_F()
[all …]
/arkcompiler/ets_frontend/ts2panda/templates/
DbuiltinsMap.ts.erb72 % for i in 2..args_len-1 # ignore first two opcode
73 % if (args[i].start_with?("imm"))
74 if (!(operands[<%= i-2%>] instanceof ir.Imm)) {
75 throw new Error("<%= i-2%> parameters must be Imm <" + ins.toString() + ">");
76 % parameters += ", <ir.Imm>operands[" + (i-2).to_s + "]"
78 % elsif (args[i].start_with?("v"))
79 if (!(operands[<%= i-2%>] instanceof ir.VReg)) {
80 throw new Error("<%= i-2%> parameters must be VReg <" + ins.toString() + ">");
81 % parameters += ", <ir.VReg>operands[" + (i-2).to_s + "]"
83 % elsif (args[i].include?("string_id"))
[all …]
/arkcompiler/runtime_core/libpandabase/tests/
Dbit_table_test.cpp53 for (size_t i = 0; i < N; i++) { in CreateEntry() local
54 entry[i] = data[i]; in CreateEntry()
121 ASSERT_EQ(table.GetRow(2).Get(0), 19); in TEST_F()
131 {{0U, 1U, 2U, 3U, 4U, 5U, 6U, 7U, 8U, 9U}, in TEST_F()
133 … {0_KB, 1_KB + 1, 1_KB + 2, 1_KB + 3, 1_KB + 4, 1_KB + 5, 1_KB + 6, 1_KB + 7, 1_KB + 8, 1_KB + 9}, in TEST_F()
134 … {0_MB, 0_MB + 1, 1_MB + 2, 1_MB + 3, 1_MB + 4, 1_MB + 5, 1_MB + 6, 1_MB + 7, 1_MB + 8, 1_MB + 9}, in TEST_F()
135 …{0_GB, 0_GB + 1, 0_GB + 2, 1_GB + 3, 1_GB + 4, 1_GB + 5, 1_GB + 6, 1_GB + 7, 1_GB + 8, 1_GB + 9}}}; in TEST_F()
140 builder.Emplace(CreateEntry<decltype(builder)>(values[2])); in TEST_F()
155 for (size_t i = 0; i < row.ColumnsCount(); i++) { in TEST_F() local
156 ASSERT_EQ(row.Get(i), values[row_index][i]); in TEST_F()
[all …]
Dmath_helpers_test.cpp26 for (uint32_t i = 1; i < 32; i++) { variable
27 val = 1U << i;
28 EXPECT_EQ(GetIntLog2(val), i);
32 for (int i = 1; i < 32; i++) { variable
33 val = (1U << i) + (i == 31 ? -1 : 1);
43 EXPECT_TRUE(IsPowerOfTwo(2));
56 for (int i = 0; i <= 1; i++) { variable
57 EXPECT_EQ(GetPowerOfTwoValue32(i), 1U);
59 for (int i = 2; i <= 2; i++) { variable
60 EXPECT_EQ(GetPowerOfTwoValue32(i), 2U);
[all …]
Dregmask_test.cpp34 for (size_t i = 0; i < base.size(); i++) { in CompareWithBitset() local
35 ASSERT_EQ(mask.Test(i), base.test(i)); in CompareWithBitset()
36 ASSERT_EQ(mask[i], base[i]); in CompareWithBitset()
45 for (size_t i = 0; i < base.size(); i++) { in TestRegMask() local
46 mask.set(i); in TestRegMask()
47 base.set(i); in TestRegMask()
49 mask.reset(i); in TestRegMask()
50 base.reset(i); in TestRegMask()
69 TestRegMask(MakeMask(0, 3, 2, 17, 25, 31));
78 RegMask mask(MakeMask(0, 2, 3, 17, 25, 31));
[all …]
Dbit_vector_test.cpp56 for (uint32_t i : cvector.GetSetBitsIndices()) { variable
57 ADD_FAILURE() << i;
59 for (uint32_t i : cvector.GetZeroBitsIndices()) { variable
60 ADD_FAILURE() << i;
82 std::fill(vector.begin() + 2, vector.begin() + 15, true);
84 for (size_t i = 0; i < 15; i++) { variable
85 if (i > 2) {
86 ASSERT_EQ(vector.PopCount(i), i - 2);
88 ASSERT_EQ(vector.PopCount(i), 0U);
94 ASSERT_EQ(vector[2], true);
[all …]
Dlist_test.cpp97 list.PushFront(*NewNode(2)); in TEST_F()
99 ASSERT_TRUE(IsEqual(list, {2, 1})); in TEST_F()
104 list.InsertAfter(list.begin(), *NewNode(2)); in TEST_F()
105 ASSERT_TRUE(IsEqual(list, {1, 2})); in TEST_F()
108 ASSERT_TRUE(IsEqual(list, {0, 1, 2})); in TEST_F()
114 for (int i = 0; i < 8; i++) in TEST_F() local
115 it = list.InsertAfter(it, *NewNode(i + 2)); in TEST_F()
116 ASSERT_TRUE(IsEqual(list, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9})); in TEST_F()
120 ASSERT_TRUE(IsEqual(list2, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9})); in TEST_F()
124 ASSERT_TRUE(IsEqual(list2, {0, 1, 2, 3, 4})); in TEST_F()
[all …]
/arkcompiler/ets_runtime/ecmascript/tests/
Dtagged_tree_test.cpp226 EXPECT_EQ(tmap->NumberOfElements(), 2); in HWTEST_F_L0()
259 EXPECT_EQ(tset->NumberOfElements(), 2); in HWTEST_F_L0()
279 for (int i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
280 keyArray[5] = '1' + static_cast<uint32_t>(i); // 5 means index of keyArray in HWTEST_F_L0()
283 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(i)); in HWTEST_F_L0()
289 for (int i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
290 keyArray[5] = '1' + static_cast<uint32_t>(i); // 5 means index of keyArray in HWTEST_F_L0()
295 EXPECT_EQ(JSTaggedValue(i), res); in HWTEST_F_L0()
308 for (int i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
309 keyArray[5] = '1' + static_cast<uint32_t>(i); // 5 means index of keyArray in HWTEST_F_L0()
[all …]
Djs_api_hashmap_test.cpp115 for (uint32_t i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
116 std::string iKey = myKey + std::to_string(i); in HWTEST_F_L0()
117 std::string iValue = myValue + std::to_string(i); in HWTEST_F_L0()
127 for (uint32_t i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
128 std::string iKey = myKey + std::to_string(i); in HWTEST_F_L0()
129 std::string iValue = myValue + std::to_string(i); in HWTEST_F_L0()
159 for (uint32_t i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
160 std::string iKey = myKey + std::to_string(i); in HWTEST_F_L0()
161 std::string iValue = myValue + std::to_string(i); in HWTEST_F_L0()
172 for (uint32_t i = 0; i < NODE_NUMBERS / 2; i++) { in HWTEST_F_L0() local
[all …]
Djs_api_tree_map_test.cpp107 for (int i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
108 std::string ikey = myKey + std::to_string(i); in HWTEST_F_L0()
109 std::string ivalue = myValue + std::to_string(i); in HWTEST_F_L0()
121 for (int i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
122 std::string ikey = myKey + std::to_string(i); in HWTEST_F_L0()
123 std::string ivalue = myValue + std::to_string(i); in HWTEST_F_L0()
145 for (int i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
146 std::string ikey = myKey + std::to_string(i); in HWTEST_F_L0()
147 std::string ivalue = myValue + std::to_string(i); in HWTEST_F_L0()
154 for (int i = 0; i < REMOVE_SIZE; i++) { in HWTEST_F_L0() local
[all …]
Dtagged_array_test.cpp64 uint32_t arrayLength = 2; in HWTEST_F_L0()
68 for (uint32_t i = 0; i < arrayLength; i++) { in HWTEST_F_L0() local
69 EXPECT_TRUE(taggedArray->Get(i).IsHole()); in HWTEST_F_L0()
77 uint32_t arrayLength = 2; in HWTEST_F_L0()
99 uint32_t arrayLength = 2; in HWTEST_F_L0()
113 EXPECT_EQ(appendArray->GetLength(), arrayLength * 2); in HWTEST_F_L0()
115 EXPECT_EQ(appendArray->Get(2), objValue); // 2: the second index in HWTEST_F_L0()
123 uint32_t arrayLength = 2; in HWTEST_F_L0()
124 uint32_t twoArrayLength = arrayLength * 2 + 1; in HWTEST_F_L0()
132 taggedArray1->Set(thread, 2, JSHandle<JSTaggedValue>(thread, JSTaggedValue::Undefined())); in HWTEST_F_L0()
[all …]
/arkcompiler/toolchain/tooling/base/
Dpt_base64.cpp27 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
44 uint32_t i = 0; in Decode() local
61 // 2: shift 2bits, 4: shift 4bits in Decode()
62 strDecode[i] = (base64Char[0] << 2) | ((base64Char[1] & 0x30) >> 4); in Decode()
63 // 2: shift 2bits, 4: shift 4bits in Decode()
64 strDecode[i + 1] = (base64Char[1] << 4) | ((base64Char[2] & 0x3c) >> 2); in Decode()
65 // 2: shift 2bits, 3: the last encode str, 6: shift 6bits in Decode()
66 strDecode[i + 2] = (base64Char[2] << 6) | base64Char[3]; in Decode()
68 i += DECODE_STR_LEN; in Decode()
96 uint32_t i = 0; in Encode() local
[all …]
/arkcompiler/runtime_core/tests/cts-assembly/
Darrays-06.pa41 # for (int i = 0; i < n; i++) {
42 # arr[i] = 4;
43 # sum += arr[i];
51 # for (int i = 0; i < n; i++) {
52 # arr[i] = 3;
53 # sum += arr[i];
55 # n += 2;
63 # for (int i = 0; i < n; i++) {
64 # arr[i] = 2;
65 # sum += arr[i];
[all …]
/arkcompiler/ets_frontend/es2panda/util/
Dbase64.cpp28 …for (size_t i = 0, j = 0; i < encodedRes.length() - 2; i += TRANSFORMED_CHAR_NUM, j += TO_TRANSFOR… in Base64Encode() local
31 encodedRes[i] = base64CharSet[(inputString[j] & 0xff) >> 2]; in Base64Encode()
32 // 00 + the last 2 bits of the first char + the first 4 bits of the second char in Base64Encode()
33 …encodedRes[i + 1] = base64CharSet[(inputString[j] & 0x03) << 4 | (inputString[j + 1] & 0xf0) >> 4]; in Base64Encode()
34 // 00 + last 4 bits of the second char + the first 2 bits of the third char in Base64Encode()
35 …encodedRes[i + 2] = base64CharSet[(inputString[j + 1] & 0x0f) << 2 | (inputString[j + 2] & 0xc0) >… in Base64Encode()
37 encodedRes[i + 3] = base64CharSet[inputString[j + 2] & 0x3f]; in Base64Encode()
41 encodedRes[encodedRes.length() - 2] = '='; in Base64Encode()
44 case 2: in Base64Encode()
65 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, in Base64Decode()
[all …]
/arkcompiler/ets_frontend/ts2panda/tests/expression/
DprefixOperations.test.ts46 it('let i = 5; ++i', function () {
47 let insns = compileMainSnippet("let i = 5; let j = ++i");
48 … IRNode.pg = new PandaGen("foo", creatAstFromSnippet("let i = 5; let j = ++i"), 0, undefined);
54 new Sttoglobalrecord(new Imm(0), 'i'),
55 new Tryldglobalbyname(new Imm(1), 'i'),
58 new Inc(new Imm(2)),
59 new Trystglobalbyname(new Imm(3), 'i'),
67 it('let i = 5; --i', function () {
68 let insns = compileMainSnippet("let i = 5; let j = --i");
69 … IRNode.pg = new PandaGen("foo", creatAstFromSnippet("let i = 5; let j = --i"), 0, undefined);
[all …]
/arkcompiler/runtime_core/runtime/tests/
Dirtoc_test.cpp35 ASSERT_EQ(IrtocTestAddValues(1, 2), 3); in TEST()
36 ASSERT_EQ(IrtocTestAddValues(-1, -2), -3); in TEST()
57 for (size_t i = 0; i < data->size(); i++) { in ModifyArrayForLoopTest() local
58 if ((i % 2) == 0) { in ModifyArrayForLoopTest()
59 if (((*data)[i] % 2) == 0) { in ModifyArrayForLoopTest()
60 (*data)[i] += 2; in ModifyArrayForLoopTest()
61 res += 2; in ModifyArrayForLoopTest()
63 (*data)[i] += 1; in ModifyArrayForLoopTest()
67 (*data)[i] -= 1; in ModifyArrayForLoopTest()
77 for (size_t i = 0; i < buf.size(); i++) { in TestLoop() local
[all …]
/arkcompiler/ets_runtime/ecmascript/containers/tests/
Dcontainers_linked_list_test.cpp66 JSHandle<JSTaggedValue> list = GetCallArg(argv, 2); // 2 means the secode arg in TestForEachFunc()
69 … JSHandle<JSTaggedValue> newValue(thread, JSTaggedValue(value->GetInt() * 2)); // 2 means mul by 2 in TestForEachFunc()
188 for (uint32_t i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
189 result = LinkedListInsert(linkedlist, JSTaggedValue(i), JSTaggedValue(5)); in HWTEST_F_L0()
191 EXPECT_EQ(linkedlist->Length(), static_cast<int>(i + 1)); in HWTEST_F_L0()
198 // Insert in position NODE_NUMBERS / 2(middle) with value 10 in HWTEST_F_L0()
199 result = LinkedListInsert(linkedlist, JSTaggedValue(NODE_NUMBERS / 2), JSTaggedValue(10)); in HWTEST_F_L0()
201 EXPECT_EQ(linkedlist->Length(), static_cast<int>(NODE_NUMBERS + 2)); in HWTEST_F_L0()
203 // Insert in position NODE_NUMBERS + 2(last) with value 10 in HWTEST_F_L0()
204 result = LinkedListInsert(linkedlist, JSTaggedValue(NODE_NUMBERS + 2), JSTaggedValue(10)); in HWTEST_F_L0()
[all …]
Dcontainers_plainarray_test.cpp66 JSHandle<JSAPIPlainArray> plainArray(GetCallArg(argv, 2)); // 2 means the value in TestForEachFunc()
68 … JSHandle<JSTaggedValue> newValue(thread, JSTaggedValue(value->GetInt() * 2)); // 2 means the value in TestForEachFunc()
178 for (uint32_t i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
183 callInfo->SetCallArg(0, JSTaggedValue(i)); in HWTEST_F_L0()
184 callInfo->SetCallArg(1, JSTaggedValue(i + 1)); in HWTEST_F_L0()
190 EXPECT_EQ(tArray1->GetSize(), static_cast<int>(i + 1)); in HWTEST_F_L0()
194 for (uint32_t i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
199 callInfo->SetCallArg(0, JSTaggedValue(i)); in HWTEST_F_L0()
213 for (uint32_t i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
214 std::string ivalue = myValue + std::to_string(i); in HWTEST_F_L0()
[all …]
/arkcompiler/ets_runtime/ecmascript/
Decma_runtime_call_info.h111 ASSERT_PRINT(GetArgsNumber() == 2, "args number is not 2"); // 2: args number in SetCallArg()
121 SetArg(FIRST_ARGS_INDEX + 2, arg2); // 2: second index in SetCallArg()
130 SetArg(FIRST_ARGS_INDEX + 2, arg2); // 2: second index in SetCallArg()
140 SetArg(FIRST_ARGS_INDEX + 2, arg2); // 2: second index in SetCallArg()
147 for (int32_t i = 0; i < argc; i++) { in SetCallArg() local
148 SetCallArg(i, JSTaggedValue(argv[i])); in SetCallArg()
154 for (uint32_t i = 0; i < argsLength; i++) { in SetCallArg() local
155 SetCallArg(i, args->Get(GetThread(), i)); in SetCallArg()
161 for (int32_t i = 0; i < argsLength; i++) { in SetCallArg() local
162 SetCallArg(i, args->Get(GetThread(), i)); in SetCallArg()
[all …]
/arkcompiler/ets_runtime/test/moduletest/typearray/
Dtypearray.js32 ].forEach(function(ctor, i) { argument
44 ].forEach(function(ctor, i) { argument
64 for (let i = 0; i < result.length; i++) {
65 if (!result[i]) {
75 for (let i = 0; i < 5; i++) {
76 obj[i] = i;
79 for (let i = 0; i < 5; i++) {
80 result.push(child[i] == undefined);
82 for (let i = 0; i < result.length; i++) {
83 if (!result[i]) {
[all …]

12345678910>>...26