| /arkcompiler/runtime_core/static_core/plugins/ets/tests/stdlib-templates/utils/ |
| D | test_check_test_regexp_result.j2 | 16 function checkTestResult(actual : RegExpExecArray | null, expected : RegExpExecArray | null) : int { 17 if (actual == null && expected == null) { 20 if (actual == null || expected == null) { 24 if (actual.isCorrect != expected.isCorrect) { 25 console.println("isCorrect field of actual is not equals to expected") 27 console.println("expected.isCorrect : " + expected.isCorrect) 31 if (actual.index != expected.index) { 32 console.println("index field of actual is not equals to expected") 34 console.println("expected.index : " + expected.index) 38 if (actual.result.length != expected.result.length) { [all …]
|
| D | test_verifier_lib.j2 | 17 function compareStringTrivial(actual : String, expected : String) : boolean { 18 if (actual == expected) return true; 24 function compareStringBuilderWithString(actual : StringBuilder, expected : String) : boolean { 26 return expected.equals(tmpString); 32 function comparePrimitiveValue(actual : {{.item.method_return_type}}, expected : {{.item.method_ret… 34 function comparePrimitiveValue(actual : {{.item.result_type}}, expected : {{.item.result_type}}) : … 36 if (actual == expected) return true; 62 function compareWrapperObjectValue(actual : {{.item.method_return_type}}, expected : {{.item.expect… 66 return compareFloatPointValue(actual2, expected); 68 if (actual2 == expected) return true; [all …]
|
| D | test_check_test_float_result.j2 | 17 function checkTestResult(actual : {{.item.result_type}}, expected : {{.item.result_type}}) : int { 21 if(expected.isNaN()) { 26 if({{.item.result_type|capitalize}}.isNaN(expected)) { 32 if(expected == {{.item.result_type|capitalize}}.POSITIVE_INFINITY) { 37 if(expected == {{.item.result_type|capitalize}}.NEGATIVE_INFINITY) { 41 if (actual == expected) { 45 if (actual > expected) { 46 diff = actual - expected; 48 diff = expected - actual; 56 if (actual == expected) return 0;
|
| /arkcompiler/runtime_core/libpandafile/tests/ |
| D | file_items_test.cpp | 78 std::string expected; variable 81 expected = "annotation_item"; 84 expected = "catch_block_item"; 87 expected = "class_index_item"; 90 expected = "class_item"; 93 expected = "code_item"; 96 expected = "debug_info_item"; 99 expected = "end_item"; 102 expected = "field_index_item"; 105 expected = "field_item"; [all …]
|
| D | bytecode_emitter_tests.cpp | 114 std::vector<uint8_t> expected; variable 116 expected << Opcode::RETURN; 118 expected << Opcode::JMP_IMM8 << -num_ret; 119 ASSERT_EQ(expected, out); 137 std::vector<uint8_t> expected; variable 138 expected << Opcode::JMP_IMM8 << (num_ret + globals::IMM_2); 140 expected << Opcode::RETURN; 142 ASSERT_EQ(expected, out); 158 std::vector<uint8_t> expected; variable 160 expected << Opcode::RETURN; [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/scenarios/js_to_ets/indirect_call/ |
| D | indirect_value.sts | 18 const EXPECTED = 2; 21 assert(result == EXPECTED); 27 const EXPECTED = 2; 30 assert(result == EXPECTED); 36 const EXPECTED = 2; 39 assert(boundWithArg() as int == EXPECTED); 45 const EXPECTED = 2; 48 assert(boundWithoutArg(1) as int == EXPECTED); 55 const EXPECTED = ''.concat(ARG, ARG); 58 assert(result == EXPECTED); [all …]
|
| /arkcompiler/runtime_core/assembler/tests/ |
| D | lexer_test.cpp | 30 ASSERT_EQ(TokenTypeWhat(tok.first[0].type), "OPERATION") << "OPERATION expected"; in TEST() 31 ASSERT_EQ(TokenTypeWhat(tok.first[1].type), "ID") << "ID expected"; in TEST() 32 ASSERT_EQ(TokenTypeWhat(tok.first[2].type), "DEL_COMMA") << "DEL_COMMA expected"; in TEST() 33 ASSERT_EQ(TokenTypeWhat(tok.first[3].type), "ID") << "ID expected"; in TEST() 34 ASSERT_EQ(tok.second.err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST() 42 ASSERT_EQ(TokenTypeWhat(tok.first[0].type), "OPERATION") << "OPERATION expected"; in TEST() 43 ASSERT_EQ(TokenTypeWhat(tok.first[1].type), "ID") << "ID expected"; in TEST() 44 ASSERT_EQ(tok.second.err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST() 52 ASSERT_EQ(TokenTypeWhat(tok.first[0].type), "OPERATION") << "OPERATION expected"; in TEST() 53 ASSERT_EQ(TokenTypeWhat(tok.first[1].type), "OPERATION") << "OPERATION expected"; in TEST() [all …]
|
| D | assembler_lexer_test.cpp | 41 EXPECT_EQ(TokenTypeWhat(tok.first[0].type), "OPERATION") << "OPERATION expected"; 42 EXPECT_EQ(TokenTypeWhat(tok.first[1].type), "ID") << "ID expected"; 43 EXPECT_EQ(TokenTypeWhat(tok.first[2].type), "DEL_COMMA") << "DEL_COMMA expected"; 44 EXPECT_EQ(TokenTypeWhat(tok.first[3].type), "ID") << "ID expected"; 45 EXPECT_EQ(tok.second.err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; 59 EXPECT_EQ(TokenTypeWhat(tok.first[0].type), "OPERATION") << "OPERATION expected"; 60 EXPECT_EQ(TokenTypeWhat(tok.first[1].type), "ID") << "ID expected"; 61 EXPECT_EQ(tok.second.err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; 75 EXPECT_EQ(TokenTypeWhat(tok.first[0].type), "ID") << "ID expected"; 76 EXPECT_EQ(TokenTypeWhat(tok.first[1].type), "OPERATION") << "OPERATION expected"; [all …]
|
| /arkcompiler/runtime_core/static_core/assembler/tests/ |
| D | lexer_test.cpp | 33 ASSERT_EQ(TokenTypeWhat(tok.first[0].type), "OPERATION") << "OPERATION expected"; in TEST() 34 ASSERT_EQ(TokenTypeWhat(tok.first[1].type), "ID") << "ID expected"; in TEST() 35 ASSERT_EQ(TokenTypeWhat(tok.first[2].type), "DEL_COMMA") << "DEL_COMMA expected"; in TEST() 36 ASSERT_EQ(TokenTypeWhat(tok.first[3].type), "ID") << "ID expected"; in TEST() 37 ASSERT_EQ(tok.second.err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST() 45 ASSERT_EQ(TokenTypeWhat(tok.first[0].type), "OPERATION") << "OPERATION expected"; in TEST() 46 ASSERT_EQ(TokenTypeWhat(tok.first[1].type), "ID") << "ID expected"; in TEST() 47 ASSERT_EQ(tok.second.err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST() 55 ASSERT_EQ(TokenTypeWhat(tok.first[0].type), "OPERATION") << "OPERATION expected"; in TEST() 56 ASSERT_EQ(TokenTypeWhat(tok.first[1].type), "OPERATION") << "OPERATION expected"; in TEST() [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/escompat/ |
| D | RegExpMatchAllTest.sts | 46 function test(r: RegExp, str: String, expected: RegExpMatchArray[]) { 50 for (let i = 0; i < expected.length; ++i) { 51 failure += checkTestResult(v.value!, expected[i]); 58 function checkTestResult(actual: boolean, expected: boolean) : int { 59 if (actual != expected) return 1; 63 function checkTestResult(actual: int, expected: int) : int { 64 if (actual != expected) return 1; 70 function checkTestResult(actual : RegExpExecArray | null, expected : RegExpExecArray | null) : int { 71 if (actual == null && expected == null) { 74 if (actual == null || expected == null) { [all …]
|
| D | JsonParseTest.sts | 221 static assertEquals(expected: NullishType, actual: NullishType): void { 222 assert __runtimeSameValueZero(expected, actual) : `expected ${expected} but was ${actual}` 225 static assertSame(expected: NullishType, actual: NullishType): void { 226 … assert __runtimeIsSameReference(expected, actual) : `expected "${expected}" but was "${actual}"` 230 assert actual : "expected true but was false" 233 …static assertArrayEquals<T>(expected: T[] | undefined | null, actual: T[] | undefined | null): voi… 234 if (expected === null) { 235 assert actual === null : `expected 'null' but was [${actual}]` 236 } else if (expected === undefined) { 237 assert actual === undefined : `expected 'undefined' but was [${actual}]` [all …]
|
| /arkcompiler/runtime_core/static_core/tests/tests-u-runner/runner/test/chapters_test/ |
| D | chapters_test.py | 55 expected: Set[str] = { 63 self.assertSetEqual(actual, expected) 72 expected: Set[str] = { 80 self.assertSetEqual(actual, expected) 89 expected: Set[str] = { 96 self.assertSetEqual(actual, expected) 105 expected: Set[str] = { 108 self.assertSetEqual(actual, expected) 117 expected: Set[str] = { 121 self.assertSetEqual(actual, expected) [all …]
|
| /arkcompiler/runtime_core/libpandabase/tests/ |
| D | expected_test.cpp | 16 #include "utils/expected.h" 22 namespace panda::test::expected { namespace 26 static Expected<int, ErrorCode> helper(int v) in helper() 46 TEST(Expected, Unexpected) in TEST() argument 55 TEST(Expected, Ctor) in TEST() argument 58 auto e = Expected<int, ErrorCode>(v); in TEST() 63 auto e0 = Expected<int, ErrorCode>(); in TEST() 66 auto e1 = Expected<int, ErrorCode>(2); in TEST() 69 auto e2 = Expected<int, ErrorCode>(Unexpected(ErrorCode::First)); in TEST() 71 auto e3 = Expected<int, ErrorCode>(u); in TEST() [all …]
|
| /arkcompiler/runtime_core/static_core/libpandabase/tests/ |
| D | expected_test.cpp | 16 #include "utils/expected.h" 22 namespace ark::test::expected { namespace 28 static Expected<int, ErrorCode> Helper(int v) in Helper() 48 TEST(Expected, Unexpected) in TEST() argument 57 TEST(Expected, Ctor) in TEST() argument 60 auto e = Expected<int, ErrorCode>(v); in TEST() 65 auto e0 = Expected<int, ErrorCode>(); in TEST() 68 auto e1 = Expected<int, ErrorCode>(2U); in TEST() 71 auto e2 = Expected<int, ErrorCode>(Unexpected(ErrorCode::FIRST)); in TEST() 73 auto e3 = Expected<int, ErrorCode>(u); in TEST() [all …]
|
| D | type_converter_tests.cpp | 47 double expected = leftPartTime + rightPartTime * 1e-3; in TEST() local 49 ASSERT_EQ(TimeConverter(nanos), ValueUnit(expected, "us")); in TEST() 50 ASSERT_EQ(TimeConverter(nanos * 1e3), ValueUnit(expected, "ms")); in TEST() 51 ASSERT_EQ(TimeConverter(nanos * 1e6), ValueUnit(expected, "s")); in TEST() 52 ASSERT_EQ(TimeConverter(nanos * 1e6 * 60), ValueUnit(expected, "m")); in TEST() 53 ASSERT_EQ(TimeConverter(nanos * 1e6 * 60 * 60), ValueUnit(expected, "h")); in TEST() 54 ASSERT_EQ(TimeConverter(nanos * 1e6 * 60 * 60 * 24), ValueUnit(expected, "day")); in TEST() 82 double expected = leftPartBytes + rightPartBytes * 1e-3; in TEST() local 84 ASSERT_EQ(MemoryConverter(bytes), ValueUnit(expected, "KB")); in TEST() 85 ASSERT_EQ(MemoryConverter(bytes * (1UL << 10U)), ValueUnit(expected, "MB")); in TEST() [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/stdlib-templates/std/core/ |
| D | list.copyWithin.yaml | 16 expected: [1, 2, 3, 4, 5], 21 expected: [1, 2, 3, 4, 5], 26 expected: [1, 2, 3, 4, 5], 31 expected: [1, 2, 3, 4, 5], 37 expected: [4, 5, 3, 4, 5], 42 expected: [1, 4, 5, 4, 5], 47 expected: [1, 3, 4, 5, 5], 52 expected: [1, 2, 3, 4, 5], 57 expected: [4, 2, 3, 4, 5], 62 expected: [1, 4, 3, 4, 5], [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/stdlib-templates/escompat/ |
| D | list.copyWithin.yaml | 16 expected: [1, 2, 3, 4, 5], 21 expected: [1, 2, 3, 4, 5], 26 expected: [1, 2, 3, 4, 5], 31 expected: [1, 2, 3, 4, 5], 37 expected: [4, 5, 3, 4, 5], 42 expected: [1, 4, 5, 4, 5], 47 expected: [1, 3, 4, 5, 5], 52 expected: [1, 2, 3, 4, 5], 57 expected: [4, 2, 3, 4, 5], 62 expected: [1, 4, 3, 4, 5], [all …]
|
| /arkcompiler/runtime_core/static_core/libpandafile/tests/ |
| D | bytecode_emitter_tests.cpp | 116 std::vector<uint8_t> expected; in TEST() local 118 expected << Opcode::RETURN_VOID; in TEST() 120 expected << Opcode::JMP_IMM8 << -numRet; in TEST() 121 ASSERT_EQ(expected, out); in TEST() 139 std::vector<uint8_t> expected; in TEST() local 140 expected << Opcode::JMP_IMM8 << numRet + globals::IMM_2; in TEST() 142 expected << Opcode::RETURN_VOID; in TEST() 144 ASSERT_EQ(expected, out); in TEST() 160 std::vector<uint8_t> expected; in TEST() local 162 expected << Opcode::RETURN_VOID; in TEST() [all …]
|
| /arkcompiler/ets_frontend/ets2panda/test/runtime/ets/ |
| D | trailing-lambda.sts | 38 assert x == 2: "expected: " + 2 + " actual: " + x; 44 assert x == 3: "expected: " + 3 + " actual: " + x; 50 assert x == 5: "expected: " + 5 + " actual: " + x; 54 assert x == 6: "expected: " + 6 + " actual: " + x; 55 assert b == y: "expected: " + y + " actual: " + b; 58 assert x == 7: "expected: " + 7 + " actual: " + x; 59 assert a == y: "expected: " + y + " actual: " + a; 81 assert num == 0: "expected: " + 0 + " actual: " + num; 103 assert A.n == 2: "expected: " + 2 + " actual: " + A.n; 108 assert A.n == 3: "expected: " + 3 + " actual: " + A.n; [all …]
|
| D | trailing-lambda-with-capture.sts | 27 assert num_const == 1: "expected: " + 1 + " actual: " + num_const; 28 assert num == 2: "expected: " + 2 + " actual: " + num; 31 assert num_const == 1: "expected: " + 1 + " actual: " + num_const; 32 assert num == 3: "expected: " + 3 + " actual: " + num; 42 assert num == 4: "expected: " + 4 + " actual: " + num; 43 assert num_const == 1: "expected: " + 1 + " actual: " + num_const; 48 assert num_const == 1: "expected: " + 1 + " actual: " + num_const; 51 assert num == 6: "expected: " + 6 + " actual: " + num; 60 assert num == 7: "expected: " + 7 + " actual: " + num; 64 assert num == 8: "expected: " + 8 + " actual: " + num;
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_test_suite/coroutines/ |
| D | launch_instruction.sts | 36 console.println("Test 'onearg': expected argument '1' but was " + x); 45 console.println("Test 'twoargs': expected first argument '1' but was " + x); 49 console.println("Test 'twoargs': expected second argument '2' but was " + y); 58 console.println("Test 'threeargs': expected first argument '1' but was " + x); 62 console.println("Test 'threeargs': expected second argument '2' but was " + y); 66 console.println("Test 'threeargs': expected third argument '3' but was " + z); 75 console.println("Test 'fourargs': expected first argument '1' but was " + x1); 79 console.println("Test 'fourargs': expected second argument '2' but was " + x2); 83 console.println("Test 'fourargs': expected third argument '3' but was " + x3); 87 console.println("Test 'fourargs': expected fourth argument '4' but was " + x4); [all …]
|
| /arkcompiler/ets_runtime/ecmascript/jspandafile/ |
| D | js_pandafile_executor.h | 36 static Expected<JSTaggedValue, bool> ExecuteFromFile(JSThread *thread, const CString &name, 39 …static Expected<JSTaggedValue, bool> ExecuteFromAbsolutePathAbcFile(JSThread *thread, const CStrin… 43 … static Expected<JSTaggedValue, bool> ExecuteFromAbcFile(JSThread *thread, const CString &filename, 46 …static Expected<JSTaggedValue, bool> ExecuteFromBuffer(JSThread *thread, const void *buffer, size_… 49 …static Expected<JSTaggedValue, bool> ExecuteModuleBuffer(JSThread *thread, const void *buffer, siz… 51 …static Expected<JSTaggedValue, bool> CommonExecuteBuffer(JSThread *thread, bool isBundle, const CS… 54 static Expected<JSTaggedValue, bool> Execute(JSThread *thread, const JSPandaFile *jsPandaFile, 58 …static Expected<JSTaggedValue, bool> ExecuteSpecialModule(JSThread *thread, const CString &recordN… 61 static Expected<JSTaggedValue, bool> LazyExecuteModule(JSThread *thread, CString &recordName, 64 …static Expected<JSTaggedValue, bool> ExecuteFromBufferSecure(JSThread *thread, uint8_t *buffer, si… [all …]
|
| /arkcompiler/runtime_core/static_core/runtime/tests/ |
| D | object_helpers_test.cpp | 160 ObjectHeader *expected = AllocString(); in TEST_F() local 161 ASSERT_NE(nullptr, expected); in TEST_F() 162 ObjectAccessor::SetFieldObject<false>(klass, *field, expected); in TEST_F() 165 …auto handler = [klass, &count, expected](ObjectHeader *obj, ObjectHeader *ref, uint32_t offset, bo… in TEST_F() 168 EXPECT_EQ(expected, ref); in TEST_F() 189 ObjectHeader *expected = AllocString(); in TEST_F() local 190 ASSERT_NE(nullptr, expected); in TEST_F() 191 ObjectAccessor::SetFieldObject<false>(klass, *field, expected); in TEST_F() 194 …auto handler = [klass, &count, expected](ObjectHeader *obj, ObjectHeader *ref, uint32_t offset, bo… in TEST_F() 197 EXPECT_EQ(expected, ref); in TEST_F() [all …]
|
| /arkcompiler/runtime_core/tests/fuzztest/expected_fuzzer/ |
| D | expected_fuzzer.cpp | 18 #include "utils/expected.h" 25 panda::Expected<int, ErrorCode> expected; in ExpectedFuzzTest() local 26 if (expected.HasValue() && *expected != expected.Value()) { in ExpectedFuzzTest()
|
| /arkcompiler/ets_frontend/ets2panda/test/tsconfig/ |
| D | test.sh | 35 EXPECTED="$TSCONFIG_DIR"/expected.txt 41 ensure_exists "$EXPECTED" 54 diff "$EXPECTED" "$ACTUAL" 58 echo "Expected:" 59 cat "$EXPECTED" 65 echo "diff $(realpath $EXPECTED) $(pwd)/actual.txt"
|