Skip to content

Commit eb1f862

Browse files
committed
Add missing test for exception on bad 5xxx opcode.
1 parent dac1155 commit eb1f862

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/test_chip8cpu.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,12 @@ def test_misc_routines_raises_exception_on_unknown_op_codes(self):
811811
self.cpu.misc_routines()
812812
self.assertEqual("Unknown op-code: F0FF", str(context.exception))
813813

814+
def test_save_skip_routines_raises_exception_on_unknown_op_codes(self):
815+
self.cpu.operand = 0x50FF
816+
with self.assertRaises(UnknownOpCodeException) as context:
817+
self.cpu.misc_routines()
818+
self.assertEqual("Unknown op-code: 50FF", str(context.exception))
819+
814820
def test_scroll_down_called(self):
815821
self.cpu.operand = 0x00C4
816822
self.cpu.clear_return()

0 commit comments

Comments
 (0)