Home
last modified time | relevance | path

Searched full:expected (Results 1 – 25 of 454) sorted by relevance

12345678910>>...19

/arkcompiler/runtime_core/assembler/tests/
Dlexer_test.cpp30 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 …]
/arkcompiler/runtime_core/libpandabase/tests/
Dexpected_test.cpp16 #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 …]
Dtype_converter_tests.cpp44 double expected = left_part_time + right_part_time * 1e-3; variable
46 ASSERT_EQ(TimeConverter(nanos), ValueUnit(expected, "us"));
47 ASSERT_EQ(TimeConverter(nanos * 1e3), ValueUnit(expected, "ms"));
48 ASSERT_EQ(TimeConverter(nanos * 1e6), ValueUnit(expected, "s"));
49 ASSERT_EQ(TimeConverter(nanos * 1e6 * 60), ValueUnit(expected, "m"));
50 ASSERT_EQ(TimeConverter(nanos * 1e6 * 60 * 60), ValueUnit(expected, "h"));
51 ASSERT_EQ(TimeConverter(nanos * 1e6 * 60 * 60 * 24), ValueUnit(expected, "day"));
78 double expected = left_part_bytes + right_part_bytes * 1e-3; variable
80 ASSERT_EQ(MemoryConverter(bytes), ValueUnit(expected, "KB"));
81 ASSERT_EQ(MemoryConverter(bytes * (1UL << 10)), ValueUnit(expected, "MB"));
[all …]
/arkcompiler/ets_frontend/ts2panda/tests/expression/
Dbinary.test.ts62 let expected = [ variable
69 expect(checkInstructions(insns, expected)).to.be.true;
76 let expected = [ variable
83 expect(checkInstructions(insns, expected)).to.be.true;
92 let expected = [ variable
108 expect(checkInstructions(insns, expected)).to.be.true;
121 let expected = [ variable
138 expect(checkInstructions(insns, expected)).to.be.true;
152 let expected = [ variable
169 expect(checkInstructions(insns, expected)).to.be.true;
[all …]
Dliteral.test.ts51 let expected = [ variable
55 expect(checkInstructions(insns, expected)).to.be.true;
60 let expected = [ variable
64 expect(checkInstructions(insns, expected)).to.be.true;
69 let expected = [ variable
73 expect(checkInstructions(insns, expected)).to.be.true;
78 let expected = [ variable
82 expect(checkInstructions(insns, expected)).to.be.true;
87 let expected = [ variable
91 expect(checkInstructions(insns, expected)).to.be.true;
[all …]
DcmpBinary.test.ts63 let expected = [ variable
76 expect(checkInstructions(insns, expected)).to.be.true;
86 let expected = [ variable
99 expect(checkInstructions(insns, expected)).to.be.true;
109 let expected = [ variable
122 expect(checkInstructions(insns, expected)).to.be.true;
132 let expected = [ variable
145 expect(checkInstructions(insns, expected)).to.be.true;
155 let expected = [ variable
168 expect(checkInstructions(insns, expected)).to.be.true;
[all …]
DnumericLiteral.test.ts36 let expected = [new Lda(new VReg())]; variable
37 expect(checkInstructions(insns, expected)).to.be.true;
45 let expected = [new Lda(new VReg())]; variable
46 expect(checkInstructions(insns, expected)).to.be.true;
53 let expected = [new Ldai(new Imm(1))]; variable
54 expect(checkInstructions(insns, expected)).to.be.true;
61 let expected = [new Fldai(new Imm(2147483648))]; variable
62 expect(checkInstructions(insns, expected)).to.be.true;
69 let expected = [new Fldai(new Imm(1.1))]; variable
70 expect(checkInstructions(insns, expected)).to.be.true;
DoperationEqual.test.ts52 let expected = [ variable
62 expect(checkInstructions(insns, expected)).to.be.true;
72 let expected = [ variable
82 expect(checkInstructions(insns, expected)).to.be.true;
92 let expected = [ variable
102 expect(checkInstructions(insns, expected)).to.be.true;
112 let expected = [ variable
122 expect(checkInstructions(insns, expected)).to.be.true;
132 let expected = [ variable
142 expect(checkInstructions(insns, expected)).to.be.true;
[all …]
Ddelete.test.ts44 let expected = [ variable
54 expect(checkInstructions(insns, expected)).to.be.true;
67 let expected = [ variable
78 expect(checkInstructions(insns, expected)).to.be.true;
95 let expected = [ variable
103 expect(checkInstructions(insns, expected)).to.be.true;
111 let expected = [ variable
118 expect(checkInstructions(insns, expected)).to.be.true;
124 let expected = [ variable
130 expect(checkInstructions(insns, expected)).to.be.true;
[all …]
DtypeOf.test.ts43 let expected = [ variable
49 expect(checkInstructions(insns, expected)).to.be.true;
58 let expected = [ variable
70 expect(checkInstructions(insns, expected)).to.be.true;
77 let expected = [ variable
84 expect(checkInstructions(insns, expected)).to.be.true;
91 let expected = [ variable
98 expect(checkInstructions(insns, expected)).to.be.true;
DprefixOperations.test.ts52 let expected = [ variable
64 expect(checkInstructions(insns, expected)).to.be.true;
73 let expected = [ variable
85 expect(checkInstructions(insns, expected)).to.be.true;
94 let expected = [ variable
105 expect(checkInstructions(insns, expected)).to.be.true;
114 let expected = [ variable
125 expect(checkInstructions(insns, expected)).to.be.true;
134 let expected = [ variable
149 expect(checkInstructions(insns, expected)).to.be.true;
[all …]
Dcall.test.ts53 let expected = [ variable
61 expect(checkInstructions(insns, expected)).to.be.true;
69 let expected = [ variable
80 expect(checkInstructions(insns, expected)).to.be.true;
91 let expected = [ variable
102 expect(checkInstructions(insns, expected)).to.be.true;
117 let expected = [ variable
139 expect(checkInstructions(insns, expected)).to.be.true;
151 let expected = [ variable
164 expect(checkInstructions(insns, expected)).to.be.true;
[all …]
Dnew.test.ts45 let expected = [ variable
54 expect(checkInstructions(insns, expected)).to.be.true;
62 let expected = [ variable
71 expect(checkInstructions(insns, expected)).to.be.true;
80 let expected = [ variable
92 expect(checkInstructions(insns, expected)).to.be.true;
103 let expected = [ variable
115 expect(checkInstructions(insns, expected)).to.be.true;
125 let expected = [ variable
144 expect(checkInstructions(insns, expected)).to.be.true;
DpropertyAccess.test.ts50 let expected = [ variable
58 expect(checkInstructions(insns, expected)).to.be.true;
70 let expected = [ variable
79 expect(checkInstructions(insns, expected)).to.be.true;
100 let expected = [ variable
117 expect(checkInstructions(insns, expected)).to.be.true;
142 let expected = [ variable
159 expect(checkInstructions(insns, expected)).to.be.true;
180 let expected = [ variable
200 expect(checkInstructions(insns, expected)).to.be.true;
/arkcompiler/runtime_core/libpandafile/tests/
Dbytecode_emitter_tests.cpp114 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/runtime/tests/
Dobject_helpers_test.cpp158 ObjectHeader *expected = AllocString(); in TEST_F() local
159 ASSERT_NE(nullptr, expected); in TEST_F()
160 ObjectAccessor::SetFieldObject<false>(klass, *field, expected); in TEST_F()
163 …auto handler = [klass, &count, expected](ObjectHeader *obj, ObjectHeader *ref, uint32_t offset, bo… in TEST_F()
166 EXPECT_EQ(expected, ref); in TEST_F()
187 ObjectHeader *expected = AllocString(); in TEST_F() local
188 ASSERT_NE(nullptr, expected); in TEST_F()
189 ObjectAccessor::SetFieldObject<false>(klass, *field, expected); in TEST_F()
192 …auto handler = [klass, &count, expected](ObjectHeader *obj, ObjectHeader *ref, uint32_t offset, bo… in TEST_F()
195 EXPECT_EQ(expected, ref); in TEST_F()
[all …]
/arkcompiler/ets_frontend/ts2panda/tests/
Dhoist.test.ts46 let expected = [ variable
54 expect(checkInstructions(insns, expected)).to.be.true;
67 let expected = [ variable
78 expect(checkInstructions(insns, expected)).to.be.true;
88 let expected = [ variable
93 expect(checkInstructions(insns, expected)).to.be.true;
103 let expected = [ variable
109 expect(checkInstructions(insns, expected)).to.be.true;
119 let expected = [ variable
127 expect(checkInstructions(insns, expected)).to.be.true;
[all …]
/arkcompiler/ets_frontend/ts2panda/tests/watch_expression/
DaddWatch.test.ts78 let expected = [ variable
95 expect(checkInstructions(insns, expected)).to.be.true;
104 let expected = [ variable
126 expect(checkInstructions(insns, expected)).to.be.true;
135 let expected = [ variable
148 expect(checkInstructions(insns, expected)).to.be.true;
157 let expected = [ variable
169 expect(checkInstructions(insns, expected)).to.be.true;
180 let expected = [ variable
201 expect(checkInstructions(insns, expected)).to.be.true;
[all …]
/arkcompiler/ets_frontend/ts2panda/tests/statements/
DvariableDeclaration.test.ts55 let expected = [ variable
60 expect(checkInstructions(insns, expected)).to.be.true;
71 let expected = [ variable
76 expect(checkInstructions(insns, expected)).to.be.true;
87 let expected = [ variable
92 expect(checkInstructions(insns, expected)).to.be.true;
103 let expected = [ variable
110 expect(checkInstructions(insns, expected)).to.be.true;
121 let expected = [ variable
126 expect(checkInstructions(insns, expected)).to.be.true;
[all …]
Dwhile.test.ts47 let expected = [ variable
57 expect(checkInstructions(insns, expected)).to.be.true;
67 let expected = [ variable
82 expect(checkInstructions(insns, expected)).to.be.true;
96 let expected = [ variable
116 expect(checkInstructions(insns, expected)).to.be.true;
129 let expected = [ variable
148 expect(checkInstructions(insns, expected)).to.be.true;
149 // check continue jumps to the expected instruction
162 let expected = [ variable
[all …]
Dswitch.test.ts47 let expected = [ variable
62 expect(checkInstructions(insns, expected)).to.be.true;
80 let expected = [ variable
101 expect(checkInstructions(insns, expected)).to.be.true;
117 let expected = [ variable
139 expect(checkInstructions(insns, expected)).to.be.true;
153 let expected = [ variable
174 expect(checkInstructions(insns, expected)).to.be.true;
190 let expected = [ variable
212 expect(checkInstructions(insns, expected)).to.be.true;
[all …]
/arkcompiler/runtime_core/libpandabase/utils/
Dexpected.h62 // Simplified implementation of proposed std::expected
63 // Note that as with std::expected, program that tries to instantiate
64 // Expected with T or E for a reference type is ill-formed.
66 class Expected final {
69 Expected() noexcept : v_(T()) in Expected() function
72 // The following constructors are non-explicit to be aligned with std::expected
74 Expected(T v) noexcept(std::is_nothrow_move_constructible_v<T>) : v_(std::move(v)) {} in noexcept()
76Expected(Unexpected<E> e) noexcept(std::is_nothrow_move_constructible_v<E>) : v_(std::move(e.Value… in noexcept()
150 ~Expected() = default;
152 DEFAULT_COPY_SEMANTIC(Expected);
[all …]
/arkcompiler/ets_runtime/ecmascript/jspandafile/
Djs_pandafile_executor.h28 static Expected<JSTaggedValue, bool> ExecuteFromFile(JSThread *thread, const CString &filename,
31 …static Expected<JSTaggedValue, bool> ExecuteFromBuffer(JSThread *thread, const void *buffer, size_…
34 …static Expected<JSTaggedValue, bool> ExecuteModuleBuffer(JSThread *thread, const void *buffer, siz…
36 …static Expected<JSTaggedValue, bool> CommonExecuteBuffer(JSThread *thread, bool isBundle, const CS…
38 static Expected<JSTaggedValue, bool> Execute(JSThread *thread, const JSPandaFile *jsPandaFile,
/arkcompiler/runtime_core/runtime/tests/interpreter/
Dtest_runtime_interface.h103 bool expected {false};
107 bool expected {false};
111 bool expected {false};
117 bool expected {false};
122 bool expected {false};
128 bool expected {false};
133 bool expected {false};
293 ASSERT_TRUE(npe_data.expected); in ThrowNullPointerException()
298 ASSERT_TRUE(array_oob_exception_data.expected); in ThrowArrayIndexOutOfBoundsException()
305 ASSERT_TRUE(array_neg_size_exception_data.expected); in ThrowNegativeArraySizeException()
[all …]
/arkcompiler/ets_frontend/ts2panda/tests/types/
DtypeUtils.ts85 console.log("Unmatched expected type with vreg type:");
88 console.log("expected type:", expectedMap.get(vregMarker));
110 function printLiteralLog(expected: Literal, generated: Literal) {
111 console.log("expected literals:");
112 console.log(expected);
117 export function compareLiteralBuffer(expected: Array<LiteralBuffer>, generated: Array<LiteralBuffer…
118 let size = expected.length;
120 let expectedLiterals = expected[j].getLiterals();

12345678910>>...19