From ed202b107e6d286b859c042dc9e3b9b3f6c0c393 Mon Sep 17 00:00:00 2001 From: MadMaurice Date: Wed, 30 Aug 2023 22:46:06 +0200 Subject: [PATCH] test_cpu_state - Add test for SI --- tests/test_cpu_state.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_cpu_state.cpp b/tests/test_cpu_state.cpp index c744ebf..e5e9373 100644 --- a/tests/test_cpu_state.cpp +++ b/tests/test_cpu_state.cpp @@ -18,3 +18,14 @@ TEST_CASE("16-bit registers map to two 8-bit registers") CHECK(c.H == 0x33); CHECK(c.L == 0x44); } + +TEST_CASE("SI works correctly") +{ + Cpu_state c; + + + c.IE = 0b10000111; + c.IF = 0b10011100; + + CHECK(c.SI() == 0b00000100); +}