add full coverage fcvt up 16 to 64 test
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 16 Jul 2019 06:18:42 +0000 (07:18 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 16 Jul 2019 06:18:42 +0000 (07:18 +0100)
src/ieee754/fcvt/test/test_fcvt_up_pipe_16_64.py [new file with mode: 0644]

diff --git a/src/ieee754/fcvt/test/test_fcvt_up_pipe_16_64.py b/src/ieee754/fcvt/test/test_fcvt_up_pipe_16_64.py
new file mode 100644 (file)
index 0000000..7f8cbea
--- /dev/null
@@ -0,0 +1,21 @@
+""" test of FPCVTMuxInOut
+"""
+
+from ieee754.fcvt.pipeline import (FPCVTUpMuxInOut,)
+from ieee754.fpcommon.test.case_gen import run_pipe_fp
+from ieee754.fpcommon.test import unit_test_half
+from ieee754.fcvt.test.up_fcvt_data_16_32 import regressions
+
+from sfpy import Float64, Float16
+
+def fcvt_64(x):
+    return Float64(x)
+
+def test_pipe_fp16_64():
+    dut = FPCVTUpMuxInOut(16, 64, 4)
+    run_pipe_fp(dut, 16, "upfcvt", unit_test_half, Float16,
+                regressions, fcvt_64, 10, True)
+
+if __name__ == '__main__':
+    test_pipe_fp16_64()
+