summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-11-22 13:00:06 +0100
committerRoland Reichwein <mail@reichwein.it>2020-11-22 13:00:06 +0100
commit1fae63de23320a1663b7c591e247ad81852ab6dc (patch)
treebfe539b7eeb5a4d7b68aa1bf853898d60e34f784 /tests
parent739297d8895b08a9ecd8e81b01b7ba8e8dc4a8ae (diff)
Support 16-bit short
Diffstat (limited to 'tests')
-rw-r--r--tests/test-asm.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test-asm.cpp b/tests/test-asm.cpp
index 6c03f48..fd0446f 100644
--- a/tests/test-asm.cpp
+++ b/tests/test-asm.cpp
@@ -192,6 +192,15 @@ TEST_F(AsmParseTest, parse_empty) {
ASSERT_EQ(chunks2.size(), 0u);
}
+TEST_F(AsmParseTest, parse_mov_0) {
+ Segment segment;
+
+ segment.append(parseAsm("mov ax, bx"));
+
+ ASSERT_EQ(segment.size(), 1u);
+ ASSERT_EQ(segment.getCode(), std::vector<uint8_t>({ 0x66, 0x89, 0xD8}));
+}
+
TEST_F(AsmParseTest, parse_op_0) {
std::vector<std::shared_ptr<Chunk>> chunks0{parseAsm("nop")};
ASSERT_EQ(chunks0.size(), 1u);