summaryrefslogtreecommitdiffhomepage
path: root/test-asm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test-asm.cpp')
-rw-r--r--test-asm.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/test-asm.cpp b/test-asm.cpp
index 882f998..50e4112 100644
--- a/test-asm.cpp
+++ b/test-asm.cpp
@@ -82,11 +82,14 @@ TEST_F(AsmTest, Intel64_ret) {
TEST_F(AsmTest, Intel64_multiple) {
Segment segment;
+
segment.push_back(makeOp("nop"));
AsmArgs args{{Immediate8(5)}};
segment.push_back(makeOp("int", args));
segment.push_back(makeOp("ret"));
+ segment.push_back(makeLabel("data1"));
+ segment.push_back(makeData({1, 2, 3}));
- ASSERT_EQ(segment.size(), 3);
- ASSERT_EQ(segment.getCode(), std::vector<uint8_t>({0x90, 0xCD, 0x05, 0xC3}));
+ ASSERT_EQ(segment.size(), 5);
+ ASSERT_EQ(segment.getCode(), std::vector<uint8_t>({0x90, 0xCD, 0x05, 0xC3, 0x01, 0x02, 0x03}));
}