add unit tests that push the mantissa to zero or close to zero
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 17 Feb 2019 14:08:58 +0000 (14:08 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 17 Feb 2019 14:08:58 +0000 (14:08 +0000)
src/add/test_add.py

index c5e16a60ae2b58f93dc67a37f821b36825ab59c4..d3f62745866353a3666833ac77a1b9e78887ce6d 100644 (file)
@@ -72,6 +72,10 @@ def testbench(dut):
     yield from check_case(dut, 0x7F7FFFEE, 0xFEFFFFEE, 0x7EFFFFEE)
     yield from check_case(dut, 0x7F7FFFEE, 0x756CA884, 0x7F7FFFFD)
     yield from check_case(dut, 0x7F7FFFEE, 0x758A0CF8, 0x7F7FFFFF)
+    yield from check_case(dut, 0x42500000, 0x51A7A358, 0x51A7A358)
+    yield from check_case(dut, 0x51A7A358, 0x42500000, 0x51A7A358)
+    yield from check_case(dut, 0x4E5693A4, 0x42500000, 0x4E5693A5)
+    yield from check_case(dut, 0x42500000, 0x4E5693A4, 0x4E5693A5)
     #yield from check_case(dut, 1, 0, 1)
     #yield from check_case(dut, 1, 1, 1)