diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-02-24 05:04:52 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-02-24 05:04:52 +0100 |
commit | ad5973aed8524096ae2b0c51d4d839d9799cd791 (patch) | |
tree | 7930f57f9f8602266937d9818ea0a034fbcf098c /testsuite/gna | |
parent | 8f65c11d87a7dc8993d817f2db0beac9395af0a6 (diff) | |
download | ghdl-ad5973aed8524096ae2b0c51d4d839d9799cd791.tar.gz ghdl-ad5973aed8524096ae2b0c51d4d839d9799cd791.tar.bz2 ghdl-ad5973aed8524096ae2b0c51d4d839d9799cd791.zip |
Add testcase for #295
Diffstat (limited to 'testsuite/gna')
-rw-r--r-- | testsuite/gna/issue295/repro.vhdl | 14 | ||||
-rw-r--r-- | testsuite/gna/issue295/tb.vhdl | 21 | ||||
-rwxr-xr-x | testsuite/gna/issue295/testsuite.sh | 11 |
3 files changed, 46 insertions, 0 deletions
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" |