add extra unit tests
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 15 Feb 2019 12:51:42 +0000 (12:51 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 15 Feb 2019 12:51:42 +0000 (12:51 +0000)
src/add/test_add.py

index e5f0dfc2c450971c40ee56278e3df7227de43f7c..f9a0e2a256af76438874d0779d65c0ec605da5ca 100644 (file)
@@ -46,8 +46,11 @@ def check_case(dut, a, b, z):
     assert out_z == z, "Output z 0x%x not equal to expected 0x%x" % (out_z, z)
 
 def testbench(dut):
-    #yield from check_case(dut, 0, 0, 0)
+    yield from check_case(dut, 0, 0, 0)
     yield from check_case(dut, 0x3F800000, 0x40000000, 0x40400000)
+    yield from check_case(dut, 0x447A0000, 0x4488B000, 0x4502D800)
+    yield from check_case(dut, 0x463B800A, 0x42BA8A3D, 0x463CF51E)
+    yield from check_case(dut, 0x42BA8A3D, 0x463B800A, 0x463CF51E)
     #yield from check_case(dut, 1, 0, 1)
     #yield from check_case(dut, 1, 1, 1)