use correct function in unit test
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 29 Mar 2019 14:42:08 +0000 (14:42 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 29 Mar 2019 14:42:08 +0000 (14:42 +0000)
src/add/test_state_add.py
src/add/unit_test_single.py

index 1256774b5b0868ad25ab91395b11cd04496d7b94..8d1ccf592f7ed929490f0c3d80279fddaec01e1e 100644 (file)
@@ -59,12 +59,12 @@ def testbench(dut):
                     0x5e8ef81, 0x5c75da81, 0x2b017]
     stimulus_b = [0xadd79efa, 0xC0000000, 0x1c800000, 0xc038ed3a, 0xb328cd45, 
                     0x114f3db, 0x2f642a39, 0xff3807ab]
-    yield from run_test(dut, stimulus_a, stimulus_b, add, check_case)
+    yield from run_test(dut, stimulus_a, stimulus_b, add, get_case)
     count += len(stimulus_a)
     print (count, "vectors passed")
 
-    yield from run_corner_cases(dut, count, add)
-    yield from run_edge_cases(dut, count, add)
+    yield from run_corner_cases(dut, count, add, get_case)
+    yield from run_edge_cases(dut, count, add, get_case)
 
 if __name__ == '__main__':
     dut = FPADD(width=32, single_cycle=True)
index c0601288a0edb345874328c785dc9eb075a2c5da..8def914aad5df17e5cd842b49364869d7d40683b 100644 (file)
@@ -141,7 +141,6 @@ def run_test(dut, stimulus_a, stimulus_b, op, get_case_fn):
         bf = Float32.from_bits(b)
         z = op(af, bf)
         expected_responses.append((z.get_bits(), mid))
-        #print (af, bf, z)
         actual = yield from get_case_fn(dut, a, b, mid)
         actual_responses.append(actual)