diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-05-04 12:16:33 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-05-04 12:16:33 -0700 |
commit | 2d61d10eca7b7858588a4aa0eb40a7952120f527 (patch) | |
tree | 2f109f29ccec53397b092faf1f1f4b9e484d3a1a | |
parent | e96fc8696f2a509fc8f95058056cc39494804dd2 (diff) | |
download | mu-2d61d10eca7b7858588a4aa0eb40a7952120f527.tar.gz |
5136 - test for a previous bug
Thanks Charles Saternos for the bugfix in 4a0b4344a3!
-rw-r--r-- | subx/074print-int-decimal.subx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/subx/074print-int-decimal.subx b/subx/074print-int-decimal.subx index e5dbaa30..31999dcd 100644 --- a/subx/074print-int-decimal.subx +++ b/subx/074print-int-decimal.subx @@ -178,6 +178,36 @@ test-print-int32-decimal: # . end c3/return +test-print-int32-decimal-zero: + # - check that 0 converts correctly + # setup + # . clear-stream(_test-stream) + # . . push args + 68/push _test-stream/imm32 + # . . call + e8/call clear-stream/disp32 + # . . discard args + 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP + # print-int32-decimal(_test-stream, 0) + # . . push args + 68/push 0/imm32 + 68/push _test-stream/imm32 + # . . call + e8/call print-int32-decimal/disp32 + # . . discard args + 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP + # check-stream-equal(_test-stream, "0", msg) + # . . push args + 68/push "F - test-print-int32-decimal-zero"/imm32 + 68/push "0"/imm32 + 68/push _test-stream/imm32 + # . . call + e8/call check-stream-equal/disp32 + # . . discard args + 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP + # . end + c3/return + test-print-int32-decimal-multiple-digits: # - check that a multi-digit number converts correctly # setup |