aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue295
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna/issue295')
-rw-r--r--testsuite/gna/issue295/repro.vhdl14
-rw-r--r--testsuite/gna/issue295/tb.vhdl21
-rwxr-xr-xtestsuite/gna/issue295/testsuite.sh11
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"