From ad5973aed8524096ae2b0c51d4d839d9799cd791 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 24 Feb 2017 05:04:52 +0100 Subject: Add testcase for #295 --- testsuite/gna/issue295/repro.vhdl | 14 ++++++++++++++ testsuite/gna/issue295/tb.vhdl | 21 +++++++++++++++++++++ testsuite/gna/issue295/testsuite.sh | 11 +++++++++++ 3 files changed, 46 insertions(+) create mode 100644 testsuite/gna/issue295/repro.vhdl create mode 100644 testsuite/gna/issue295/tb.vhdl create mode 100755 testsuite/gna/issue295/testsuite.sh (limited to 'testsuite/gna/issue295') diff --git a/testsuite/gna/issue295/repro.vhdl b/testsuite/gna/issue295/repro.vhdl new file mode 100644 index 000000000..d1b8b6cc4 --- /dev/null +++ b/testsuite/gna/issue295/repro.vhdl @@ -0,0 +1,14 @@ +entity tb_test4 is +end tb_test4; + +architecture tb of tb_test4 is +begin + test_runner : process + begin + assert 2.0**(-1023) > 0.0 report "This passes"; + assert 2.0**(-1024) > 0.0 report "This fails" severity note; + assert 2.0**(-1024) = 0.0 report "This passes" severity failure; + + wait; + end process test_runner; +end; diff --git a/testsuite/gna/issue295/tb.vhdl b/testsuite/gna/issue295/tb.vhdl new file mode 100644 index 000000000..fc66704f3 --- /dev/null +++ b/testsuite/gna/issue295/tb.vhdl @@ -0,0 +1,21 @@ +library vunit_lib; +context vunit_lib.vunit_context; + +entity tb_test4 is + generic ( + runner_cfg : string); +end tb_test4; + +architecture tb of tb_test4 is +begin + test_runner : process + begin + test_runner_setup(runner, runner_cfg); + + assert 2.0**(-1023) > 0.0 report "This passes"; + assert 2.0**(-1024) > 0.0 report "This fails"; + + test_runner_cleanup(runner); + wait; + end process test_runner; +end; diff --git a/testsuite/gna/issue295/testsuite.sh b/testsuite/gna/issue295/testsuite.sh new file mode 100755 index 000000000..003cf56f2 --- /dev/null +++ b/testsuite/gna/issue295/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze repro.vhdl +elab_simulate tb_test4 + +clean + +echo "Test successful" -- cgit v1.2.3