From d20d92933567558b171819805e42ed23d6548d98 Mon Sep 17 00:00:00 2001 From: Max Regan Date: Mon, 19 Feb 2018 06:52:21 +0000 Subject: [PATCH] test: add assertions during video init --- gbdb_boot_test | 83 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 66 insertions(+), 17 deletions(-) diff --git a/gbdb_boot_test b/gbdb_boot_test index df1c6f7..d8dbf66 100644 --- a/gbdb_boot_test +++ b/gbdb_boot_test @@ -28,14 +28,12 @@ assert $f == 0x2 step runto 0xc -regs assert $pc == 0xc assert $hl == 0x7fff # TODO: There is a bug in GBDB where breakpoints fire at the start of an # instruction and "step" stops at the end of an instruction step; step -regs assert $pc == 0xf assert $hl == 0xff26 @@ -95,13 +93,10 @@ assert $pc == 0xa0 step assert $pc == 0xa1 -break add 0xa3 -step 100000 -break del 2 +runto 0xa3 assert $pc == 0xa3 -step #FIXME: bugs +step; step #FIXME: bugs -step assert $pc == 0xa4 step @@ -119,10 +114,8 @@ assert $pc == 0x2b step assert $pc == 0x96 -break add 0x34 -step 10000 +runto 0x34 assert $pc == 0x34 -break del 3 step; step assert $pc == 0x37 @@ -132,11 +125,9 @@ step; assert $pc == 0x39 assert $b == 0x08 -break add 0x40 -step 10000 +runto 0x40 assert $pc == 0x40 assert $b == 0 -break del 4 step; step assert $pc == 0x42 @@ -153,11 +144,69 @@ step assert $pc == 0x4a assert $c == 0x0c -break add 0x55 -step 10000 -assert $pc == 0x55 +# +# Setup Display +# + +runto 0x55 assert $a == 0 -break del 5 + +assert $pc == 0x55 +step; step +assert $h == 0 + +assert $pc == 0x56 +step +assert $a == 0x64 + +assert $pc == 0x58 +step +assert $d == 0x64 + +assert $pc == 0x59 +step + +assert $pc == 0x5b +step +assert $a == 0x91 + +assert $pc == 0x5d +step + +assert $pc == 0x5f +step +assert $b == 1 + +assert $pc == 0x60 +step +assert $e == 0x2 + +runto 0x70 +assert $pc == 0x70 + +runto 0x80 +assert $pc == 0x80 + +# +# Play sound 1 +# + +runto 0x86 +assert $pc == 0x86 + +# +# Play sound 2 +# + +runto 0xe0 +assert $pc == 0xe0 + +# +# Setup Logo comparison +# + +runto 0xf4 +assert $pc == 0xf4 runto 0x100 assert $pc == 0x100