Skip to content

Commit 7789f99

Browse files
committed
Update test_instructions.cpp
1 parent d059ef4 commit 7789f99

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

lifter/test_instructions.cpp

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,23 @@ int testInit() {
8484
.initial_flags = {{FLAG_CF, FlagState::SET}},
8585

8686
.expected_registers = {{ZYDIS_REGISTER_RAX, 1}},
87-
.expected_flags = {{FLAG_CF, FlagState::SET}}};
88-
tester.execute_test_case(tc);
87+
.expected_flags = {{FLAG_CF, FlagState::SET}},
88+
.couldBeUndefined = false};
89+
90+
/*
91+
auto expectedFlags = tester.parseFlagStates(0b101);
92+
for (auto [a, b] : expectedFlags) {
93+
outs() << "a: " << a << " b:" << b << "\n";
94+
}
95+
*/
96+
97+
TestCase tc2 = {.name = "testcase2",
98+
.instruction_bytes = {0x90},
99+
.initial_flags = tester.parseFlagStates(0b10110),
100+
101+
.expected_flags = tester.parseFlagStates(0b10110),
102+
.couldBeUndefined = true};
103+
89104
tester.addTest(tc);
90105
return tester.runAllTests();
91106
}

0 commit comments

Comments
 (0)