From 1fae63de23320a1663b7c591e247ad81852ab6dc Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 22 Nov 2020 13:00:06 +0100 Subject: Support 16-bit short --- tests/test-asm.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') 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({ 0x66, 0x89, 0xD8})); +} + TEST_F(AsmParseTest, parse_op_0) { std::vector> chunks0{parseAsm("nop")}; ASSERT_EQ(chunks0.size(), 1u); -- cgit v1.2.3