projects
/
ieee754fpu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5c82b7
)
improve assertion output for unit test
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Fri, 15 Feb 2019 09:28:29 +0000
(09:28 +0000)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Fri, 15 Feb 2019 09:28:29 +0000
(09:28 +0000)
src/add/test_add.py
patch
|
blob
|
history
diff --git
a/src/add/test_add.py
b/src/add/test_add.py
index 7769bb288323bb715446fd77d9e47bd5c3a571d3..d53cae8edd0f4b970e00fb7ddc6432bc2bf620d8 100644
(file)
--- a/
src/add/test_add.py
+++ b/
src/add/test_add.py
@@
-16,7
+16,7
@@
class ORGate:
return m
-def check_case(dut, a, b,
x
):
+def check_case(dut, a, b,
z
):
yield dut.in_a.eq(a)
yield dut.in_a_stb.eq(1)
yield
@@
-42,6
+42,9
@@
def check_case(dut, a, b, x):
yield
break
+ out_z = yield dut.out_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, 0x3F800000, 0x40000000, 0x40400000)