Home
last modified time | relevance | path

Searched full:should (Results 1 – 25 of 1850) sorted by relevance

12345678910>>...74

/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_sdk/api/@ohos/util/ArrayList/
DArrayListLengthTest.ets41 assertEQ(arrayList.length, 0, "The length of a newly created ArrayList should be 0");
48 …rrayList.length, 0, "The length of a newly created ArrayList with various data types should be 0");
67 assertEQ(arrayList[0], "zhang san", "The first element should be 'zhang san'");
68 assertEQ(arrayList[1], 1, "The second element should be 1");
69 assertEQ(arrayList[2], temp, "The third element should match the Temp object");
70 assertEQ(arrayList[3], undefined, "The fourth element should be undefined");
71 assertEQ(arrayList[4], null, "The fifth element should be null");
72 assertEQ(arrayList[5], true, "The sixth element should be true");
75 `The element at index ${i} of the seventh element should be ${[0, 1, 2, 4][i]}`);
87 assertEQ(arrayList[0], "", "The first element should be an empty string");
[all …]
DArrayListInsertHasGetIndexOfTests.ets71 assertEQ(arrayList[i], TestData.result2[i], `Element at index ${i} should match`);
73 …assertEQ(arrayList.length, TestData.testNumber6, "ArrayList length should be 6 after insert operat…
82 assertEQ(arrayList[i], TestData.result3[i], `Element at index ${i} should match`);
85 "ArrayList length should be 7 after insert operations");
110 assertEQ(arrayList[i], TestData.result4[i], `Element at index ${i} should match`);
112 …assertEQ(arrayList.length, TestData.testNumber6, "ArrayList length should be 6 after insert operat…
120 assertEQ(arrayList[i], TestData.result4[i], `Element at index ${i} should match`);
122 …assertEQ(arrayList.length, TestData.testNumber6, "ArrayList length should be 6 after insert operat…
129 assertTrue(result, "ArrayList should contain the element");
136 assertFalse(result, "ArrayList should not contain the element");
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/std/core/json/
DJsonElementTest.ets43 …undefinedElem.jsonType, jsonx.JsonType.JsonUndefined, "Undefined element should have JsonUndefined…
44 …nedWithStatic.jsonType, jsonx.JsonType.JsonUndefined, "Undefined element should have JsonUndefined…
49 … arktest.assertEQ(stringElem.asString(), "Hello, JSON!", "String value should match what was set");
53 arktest.assertEQ(numberElem.asDouble(), 123.45, "Double value should match what was set");
57 arktest.assertEQ(integerElem.asInteger(), 42, "Integer value should match what was set");
61 arktest.assertTrue(trueElem.asBoolean(), "Boolean true value should match what was set");
65 arktest.assertFalse(falseElem.asBoolean(), "Boolean false value should match what was set");
72 …arktest.assertEQ(nullElem.jsonType, jsonx.JsonType.JsonNull, "Null element should have JsonNull ty…
77 arktest.assertEQ(arrayElem.asArray().length, 6, "Array should contain 6 elements");
87 …arktest.assertEQ(objectElem.getString("name"), "John Doe", "Object property 'name' should be set c…
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_sdk/api/@ohos/util/HashMap/
DHashMapRemoveReplaceTest.ets39 assertEQ(result, 123, "The hashMap should remove the key and return its value");
40 assertEQ(hashMap.length, 0, "The hashMap length should be 0");
47 assertEQ(result, undefined, "The hashMap should return undefined when key is not set");
48 assertEQ(hashMap.length, 1, "The hashMap length should be 1");
54 assertEQ(result, undefined, "The hashMap should return undefined when the map is empty");
55 assertEQ(hashMap.length, 0, "The hashMap length should be 0");
62 assertEQ(result, 11, "The hashMap should remove the key and return its value");
63 assertEQ(hashMap.length, 0, "The hashMap length should be 0");
72 assertEQ(result1, false, "The hashMap should not be empty");
73 assertEQ(result2, undefined, "The hashMap should return undefined when the map is empty");
[all …]
DHashMapSetGetSetAllTest.ets43 assertEQ(result, 123, "The hashMap should return the correct value for the key");
44 assertEQ(hashMap.length, 1, "The hashMap length should be 1");
51 assertEQ(result, 356, "The hashMap should return the correct value for the key");
52 assertEQ(hashMap.length, 1, "The hashMap length should be 1");
60 assertEQ(e.code, 401, "The HashMap should throw a BusinessError when key is undefined");
71 assertEQ(result, 356, "The hashMap should return the correct value for the key");
72 assertEQ(hashMap.length, 1, "The hashMap length should be 1");
82 assertEQ(result, i, "The hashMap should return the correct value for the key");
84 assertEQ(hashMap.length, 1000, "The hashMap length should be 1000");
91 assertEQ(result, 356, "The hashMap should return the correct value for the key");
[all …]
DHashMapConstructorIsEmptyClearTest.ets37 assertTrue(hashMap instanceof HashMap, "The hashMap should be of the same type as the HashMap");
38 assertEQ(hashMap.length, 1, "The hashMap length should be 1");
51 assertTrue(hashMap instanceof HashMap, "The hashMap should be of the same type as the HashMap");
58 assertEQ(result, true, "The hashMap should be empty");
59 assertEQ(hashMap.length, 0, "The hashMap length should be 0");
66 assertEQ(result, false, "The hashMap should not be empty");
67 assertEQ(hashMap.length, 1, "The hashMap length should be 1");
76 assertEQ(result1, false, "The hashMap should not be empty");
77 assertEQ(result2, true, "The hashMap should be empty");
78 assertEQ(hashMap.length, 0, "The hashMap length should be 0");
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_sdk/api/@ohos/util/HashSet/
DHashSetAddRemoveTest.ets43 assertEQ(result, true, "The hashSet should contain the added value");
44 assertEQ(hashSet.length, 1, "The hashSet length should be 1");
51 assertEQ(result, true, "The hashSet should contain the added null value");
52 assertEQ(hashSet.length, 1, "HashSet length should be 1");
59 assertEQ(result, true, "The hashSet should contain the added value");
60 assertEQ(hashSet.length, 1, "The hashSet length should be 1");
68 assertEQ(result, true, "The hashSet should contain the added value");
69 assertEQ(hashSet.length, 1, "The hashSet length should be 1");
79 assertEQ(result, true, "The hashSet should contain the added value");
81 assertEQ(hashSet.length, 1000, "The hashSet length should be 1000");
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_sdk/api/@ohos/util/TreeSet/
DTreeSetPopFirstPopLastIteratorTest.ets53 assertEQ(result_popFirst, "aa", "The treeSet should pop the first value");
54 assertEQ(result_has_first, false, "The treeSet should not contain the popped first value");
55 assertEQ(result_popLast, "dd", "The treeSet should pop the last value");
56 assertEQ(result_has_last, false, "The treeSet should not contain the popped last value");
57 assertEQ(treeSet.length, 2, "The treeSet length should be 1");
65 …assertEQ(result_popFirst, undefined, "The treeSet should return undefined for popping first value …
66 …assertEQ(result_popLast, undefined, "The treeSet should return undefined for popping last value in…
67 assertEQ(treeSet.length, 0, "The treeSet length should be 0")
76 assertEQ(result_popFirst, "aa", "The treeSet should pop the first value");
77 assertEQ(result_popLast, undefined, "The treeSet should pop the last value");
[all …]
DTreeSetAddHasTest.ets49 assertEQ(result, true, "The treeSet should contain the added value");
50 assertEQ(treeSet.length, 1, "The treeSet length should be 1");
61 assertEQ(result, true, "The treeSet should contain the added value");
62 assertEQ(treeSet.length, 1, "The treeSet length should be 1");
70 assertEQ(result, true, "The treeSet should contain the added value");
71 assertEQ(treeSet.length, 1, "The treeSet Length should be 1");
79 assertEQ(result, true, "The treeSet should has the value");
80 assertEQ(treeSet.length, 1, "The treeSet length should be 1");
88 assertEQ(result, false, "The treeSet should not has the value that is not set");
89 assertEQ(treeSet.length, 1, "The treeSet length should be 1");
[all …]
DTreeSetGetLowerValueGetHigherValueTest.ets69 assertEQ(lower, "aa", "The treeSet should return the correct lower value");
70 assertEQ(lower_, "bb", "The treeSet should return the correct lower value");
71 assertEQ(higher, "bb", "The treeSet should return the correct higher value");
72 assertEQ(higher_, "cc", "The treeSet should return the correct higher value");
73 assertEQ(treeSet.length, 3, "The treeSet length should be 3")
81 …assertEQ(lower, undefined, "The treeSet should return undefined for the lower value in an empty se…
82 …assertEQ(higher, undefined, "The treeSet should return undefined for the higher value in an empty …
83 assertEQ(treeSet.length, 0, "The treeSet length should be 0")
94 …assertEQ(lower, undefined, "The treeSet should return undefined for the lower value at the boundar…
95 …assertEQ(higher, undefined, "The treeSet should return undefined for the higher value at the bound…
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_sdk/api/@ohos/util/List/
DListAddInsertTests.ets63 assertEQ(list.length, TestData.testNumber6, "List length should be 6");
64 assertEQ(list.get(0), TestData.testNumber1, "Element at index 0 should match");
65 … assertEQ(list.get(TestData.testNumber1), TestData.testString1, "Element at index 1 should match");
66 assertEQ(list.get(TestData.testNumber2), true, "Element at index 2 should match");
67 assertEQ(list.get(TestData.testNumber3), null, "Element at index 3 should match");
68 … assertEQ(list.get(TestData.testNumber4), TestData.testObject1, "Element at index 4 should match");
69 assertEQ(list.get(TestData.testNumber5), undefined, "Element at index 5 should match");
76 assertEQ(list.length, TestData.testNumber1, "List length should be 1");
90 assertEQ(list.length, TestData.testNumber8, "List length should be 8");
91 assertEQ(list.get(0), TestData.testNumber1, "Element at index 0 should match");
[all …]
DListHasGetGetLastIndexOfTests.ets53 assertTrue(list.has(TestData.testNumber1), "List should contain value 1");
61 assertEQ(value, TestData.arrayForNumber1[i++], "The element should be present");
63 assertFalse(list.has(TestData.testNumber1w), "List should not contain value 10000");
69 assertEQ(list.getLast(), TestData.testString2, "The element should be present");
71 assertEQ(list.getLast(), TestData.testString1, "The element should be present");
73 assertEQ(list.getLast(), TestData.testNumber1, "The element should be present");
75 assertEQ(list.getLast(), null, "The element should be present");
77 assertEQ(list.getLast(), true, "The element should be present");
79 assertEQ(list.getLast(), TestData.testObject2, "The element should be present");
81 assertTrue(list.has(TestData.testString2), "The element should be present");
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_sdk/api/@ohos/util/LightWeightMap/
DLightWeightMapHasAllHasKeyHasValueTest.ets53 … assertEQ(result, true, "The lightWeightMap should contain all data from another lightWeightMap");
54 assertEQ(lightWeightMap.length, 2, "The lightWeightMap length should be 2");
55 assertEQ(newLightWeightMap.length, 1, "The newLightWeightMap length should be 1");
65 …assertEQ(result, false, "The lightWeightMap should not contain data that are not set in another li…
66 assertEQ(lightWeightMap.length, 2, "The lightWeightMap length should be 2");
67 assertEQ(newLightWeightMap.length, 1, "The newLightWeightMap length should be 1");
80 … "The lightWeightMap should not contain data that are out of range in another lightWeightMap");
81 assertEQ(lightWeightMap.length, 2, "The lightWeightMap length should be 2");
82 assertEQ(newLightWeightMap.length, 3, "The newLightWeightMap length should be 3");
91 … assertEQ(result, true, "The lightWeightMap should contain all data from an empty lightWeightMap");
[all …]
DLightWeightMapSetGetTest.ets43 assertEQ(result, 123, "The lightWeightMap should return the correct value for the key");
44 assertEQ(lightWeightMap.length, 1, "The lightWeightMap length should be 1");
51 …assertEQ(result, Number.MAX_VALUE, "The lightWeightMap should return the correct value for the key…
52 assertEQ(lightWeightMap.length, 1, "The lightWeightMap length should be 1");
59 assertEQ(result, 356, "The lightWeightMap should return the correct value for the key");
60 assertEQ(lightWeightMap.length, 1, "The lightWeightMap length should be 1");
67 …assertEQ(result, undefined, "The lightWeightMap should return undefined for the key that is not se…
68 assertEQ(lightWeightMap.length, 1, "The lightWeightMap length should be 1");
74 …assertEQ(result, undefined, "The lightWeightMap should return undefined for the key in an empty ma…
75 assertEQ(lightWeightMap.length, 0, "The lightWeightMap length should be 0");
[all …]
DLightWeightMapSetAllRemoveClearTest.ets44 assertEQ(result, 356, "The newLightWeightMap should return the correct value for the key");
45 assertEQ(lightWeightMap.length, 2, "The lightWeightMap length should be 2");
46 assertEQ(newLightWeightMap.length, 2, "The lightWeightMap length should be 2");
56 assertEQ(result, 356, "The lightWeightMap should return the correct value for the key");
57 assertEQ(lightWeightMap.length, 2, "The lightWeightMap length should be 2");
58 assertEQ(newLightWeightMap.length, 0, "The newLightWeightMap length should be 0");
65 assertEQ(result, 123, "The lightWeightMap should remove the key and return its value");
66 assertEQ(lightWeightMap.length, 0, "The lightWeightMap length should be 0");
73 …assertEQ(result, undefined, "The lightWeightMap should return undefined for the key that is not se…
74 assertEQ(lightWeightMap.length, 1, "The lightWeightMap length should be 1");
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_sdk/api/@ohos/util/LightWeightSet/
DLightWeightSetGetIndexOfRemoveClearTest.ets56 assertEQ(result, 0, "The lightWeightSet should return the correct index for the value");
57 assertEQ(result1, 1, "The lightWeightSet should return the correct index for the value");
58 assertEQ(lightWeightSet.length, 2, "The lightWeightSet length should be 2");
66 …assertEQ(result, -3, "The lightWeightSet should return -3 that indicates where the key should be i…
67 assertEQ(lightWeightSet.length, 2, "The lightWeightSet length should be 2");
73 assertEQ(result, -1, "The lightWeightSet should return -1 for a value in an empty set");
74 assertEQ(lightWeightSet.length, 0, "The lightWeightSet length should be 0");
88 assertEQ(result, 0, "The lightWeightSet should return 0 for a value");
89 assertEQ(lightWeightSet.length, 1, "The lightWeightSet length should be 1");
97 assertEQ(result, 0, "The lightWeightSet should return 0 for a value");
[all …]
DLightWeightSetAddAllHasAllHasTest.ets46 … assertEQ(result, true, "The lightWeightSet should add all elements from another lightWeightSet");
47 assertEQ(lightWeightSet.length, 2, "The lightWeightSet length should be 2");
48 assertEQ(lightWeightSett.length, 2, "The lightWeightSet length should be 2");
54 … assertEQ(result, false, "The lightWeightSet should add all elements from another lightWeightSet");
64 … assertEQ(result, true, "The lightWeightSet should add all elements from another lightWeightSet");
77 …assertEQ(setA.addAll(setB), true, "The addAll method should return true when new elements are adde…
78 assertEQ(setA.length, 3, "The set length should be 3 after adding all elements");
83 …assertEQ(setA.addAll(setC), false, "The addAll method should return false when no new elements are…
93 …assertEQ(result, true, "The lightWeightSet should contain all elements from another lightWeightSet…
94 assertEQ(lightWeightSet.length, 2, "The lightWeightSet length should be 2");
[all …]
DLightWeightSetConstructorIsEmptyAddTest.ets40 "The lightWeightSet should be of the same type as the LightWeightSet");
41 assertEQ(lightWeightSet.length, 1, "The lightWeightSet length should be 1");
47 assertEQ(result, true, "The lightWeightSet should be empty");
48 assertEQ(lightWeightSet.length, 0, "The lightWeightSet length should be 0");
55 assertEQ(result, false, "The lightWeightSet should not be empty");
56 assertEQ(lightWeightSet.length, 1, "The lightWeightSet length should be 1");
64 assertEQ(result, true, "The lightWeightSet should be empty");
65 assertEQ(lightWeightSet.length, 0, "The lightWeightSet length should be 0");
75 assertEQ(result, true, "The lightWeightSet should be empty");
76 assertEQ(lightWeightSet.length, 0, "The lightWeightSet length should be 0");
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_sdk/api/@ohos/util/PlainArray/
DPlainArrayGetValueAtGetKeyAtTests.ets51 "The plainArray should return the correct key at the specified index");
57 assertEQ(plainArray.getKeyAt(0), 0, "The plainArray should return the correct key at index 0");
59 "The plainArray should return the correct key at index length - 1");
69 assertTrue(e instanceof RangeError, "The result should be 'RangeError'");
71 "The result should be 'Index out of range'");
77 assertTrue(e instanceof RangeError, "The result should be 'RangeError'");
79 "The result should be 'Index out of range'");
82 assertEQ(count, TestData.testNumber2, "The result should be 'RangeError'");
90 assertTrue(e instanceof RangeError, "The result should be 'RangeError'");
92 "The result should be 'Index out of range'");
[all …]
DPlainArrayRemoveRemoveAtRemoveRangeTests.ets61 …assertEQ(plainArray.remove(TestData.testNumber3), TestData.testNumber3, "The result should be remo…
69 "The result should be undefined when key is not exist");
70 assertEQ(plainArray.toString(), TestData.testString2, "The sequence should not change");
76 "The result should be undefined when container is empty");
77 assertEQ(plainArray.length, 0, "The sequence should not change");
83 …assertEQ(plainArray.removeAt(TestData.testNumber3), TestData.testNumber3, "The result should be re…
90 …assertEQ(plainArray.removeAt(TestData.testNumber4), TestData.testNumber4, "The result should be re…
91 assertEQ(plainArray.removeAt(0), 0, "The result should be removed value");
102 assertTrue(e instanceof RangeError, "The result should be 'RangeError'");
104 "The result should be 'Index out of range'");
[all …]
DPlainArrayGetIndexOfKeyOfValueTests.ets52 assertEQ(plainArray.getKeyAt(i), i, "The key should be exist");
53 assertEQ(plainArray.getValueAt(i), TestData.forNumber1[i], "The value should be exist");
55 assertEQ(plainArray.get(TestData.testNumber1), TestData.testNumber1, "The value should be 1");
62 assertEQ(plainArray.getKeyAt(i), i, "The key should be exist");
63 assertEQ(plainArray.getValueAt(i), TestData.forNumber1[i], "The value should be exist");
65 assertEQ(plainArray.get(TestData.testNumber1w), undefined, "The result should be undefined");
72 assertEQ(plainArray.getKeyAt(i), i, "The key should be exist");
73 assertEQ(plainArray.getValueAt(i), TestData.forNumber2[i], "The value should be exist");
75 …Array.getIndexOfKey(TestData.testNumber1), TestData.testNumber1, "The index of key 1 should be 1");
82 assertEQ(plainArray.getKeyAt(i), i, "The key should be exist");
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_sdk/api/@ohos/util/
DLRUCacheExceptionTest.ets44 assertEQ(err.code, 401, "LRUCache should throw an exception when capacity is not int")
47 assertTrue(false, "LRUCache should throw an exception when capacity is not int");
55 assertEQ(err.code, 401, "LRUCache should throw an exception when capacity is not int")
58 assertTrue(false, "LRUCache should throw an exception when capacity is not int");
66 assertEQ(err.code, 401, "LRUCache should throw an exception when capacity is not int")
69 assertTrue(false, "LRUCache should throw an exception when capacity is not int");
77 assertEQ(err.code, 401, "LRUCache should throw an exception when capacity is negative")
80 assertTrue(false, "LRUCache should throw an exception when capacity is negative");
87 assertEQ(err.code, 401, "LRUCache should throw an exception when capacity is not int")
90 assertTrue(false, "LRUCache should throw an exception when capacity is not int");
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_sdk/api/@ohos/util/LinkedList/
DLinkedListRemoveFoundTests.ets56 …assertTrue(linkedList.removeFirstFound(TestData.testNumber1), "First found element 1 should be rem…
58 …tEQ(linkedList.get(i), TestData.arrayForNumber3[i + TestData.testNumber1], "Element should match");
60 …st.length, TestData.arrayForNumber3.length - TestData.testNumber1, "LinkedList length should - 1");
68 assertEQ(linkedList.get(i), TestData.arrayForNumber3[i], "Element should match");
70 …assertEQ(linkedList.length, TestData.arrayForNumber3.length, "LinkedList length should should not …
76 …assertTrue(linkedList.removeFirstFound(TestData.testNumber2), "First found element 2 should be rem…
77 assertEQ(linkedList.get(0), TestData.testNumber1, "First element should be 1");
79 …tEQ(linkedList.get(i), TestData.arrayForNumber3[i + TestData.testNumber1], "Element should match");
81 …st.length, TestData.arrayForNumber3.length - TestData.testNumber1, "LinkedList length should - 1");
87 …assertTrue(linkedList.removeLastFound(TestData.testNumber1), "Last found element 1 should be remov…
[all …]
DLinkedListInsertHasGetTest.ets71 assertEQ(linkedList.length, TestData.testNumber8, "LinkedList length should be 8");
72 assertEQ(linkedList.get(0), TestData.testNumber1, "Element at index 0 should match");
73 …assertEQ(linkedList.get(TestData.testNumber1), TestData.testNumber1, "Element at index 6 should ma…
74 …assertEQ(linkedList.get(TestData.testNumber2), TestData.testString1, "Element at index 1 should ma…
75 assertEQ(linkedList.get(TestData.testNumber3), true, "Element at index 2 should match");
76 assertEQ(linkedList.get(TestData.testNumber4), null, "Element at index 3 should match");
77 …assertEQ(linkedList.get(TestData.testNumber5), TestData.testObject1, "Element at index 4 should ma…
78 assertEQ(linkedList.get(TestData.testNumber6), undefined, "Element at index 5 should match");
79 …assertEQ(linkedList.get(TestData.testNumber7), TestData.testNumber2, "Element at index 7 should ma…
89 …tEQ(linkedList.get(i + TestData.testNumber1), TestData.arrayForNumber1[i], "Element should match");
[all …]
/arkcompiler/ets_frontend/ets2panda/test/ast/parser/ets/
Ddeclare_class_bad_5.ets53 /* @@? 17:3 Error SyntaxError: Methods or fields should not be decorated with private in ambient cl…
54 /* @@? 18:3 Error SyntaxError: Methods or fields should not be decorated with internal in ambient c…
55 /* @@? 19:3 Error SyntaxError: Methods or fields should not be decorated with private in ambient cl…
56 /* @@? 20:3 Error SyntaxError: Methods or fields should not be decorated with internal in ambient c…
57 /* @@? 21:3 Error SyntaxError: Methods or fields should not be decorated with private in ambient cl…
58 /* @@? 22:3 Error SyntaxError: Methods or fields should not be decorated with internal in ambient c…
59 /* @@? 23:3 Error SyntaxError: Methods or fields should not be decorated with private in ambient cl…
60 /* @@? 24:3 Error SyntaxError: Methods or fields should not be decorated with internal in ambient c…
61 /* @@? 38:3 Error SyntaxError: Methods or fields should not be decorated with private in ambient cl…
62 /* @@? 42:3 Error SyntaxError: Methods or fields should not be decorated with internal in ambient c…
[all …]

12345678910>>...74