aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue143
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-08-26 05:01:57 +0200
committerTristan Gingold <tgingold@free.fr>2016-08-26 05:01:57 +0200
commitc7182c8329d493b3a953521fff55e3c635e5cf00 (patch)
tree3efdaf994546d0ea8d9d27480538d09637910f1b /testsuite/gna/issue143
parent867de6778790ed2007f5f6e8a18d14619969a257 (diff)
downloadghdl-c7182c8329d493b3a953521fff55e3c635e5cf00.tar.gz
ghdl-c7182c8329d493b3a953521fff55e3c635e5cf00.tar.bz2
ghdl-c7182c8329d493b3a953521fff55e3c635e5cf00.zip
Add testcase for issue #143
Diffstat (limited to 'testsuite/gna/issue143')
-rw-r--r--testsuite/gna/issue143/repro.vhdl8
-rwxr-xr-xtestsuite/gna/issue143/testsuite.sh10
-rw-r--r--testsuite/gna/issue143/universal_conversion_tb.vhd24
3 files changed, 42 insertions, 0 deletions
diff --git a/testsuite/gna/issue143/repro.vhdl b/testsuite/gna/issue143/repro.vhdl
new file mode 100644
index 000000000..c851c0df1
--- /dev/null
+++ b/testsuite/gna/issue143/repro.vhdl
@@ -0,0 +1,8 @@
+entity e is
+end;
+
+architecture a of e is
+ constant a : real := 1000.0 / 100;
+ constant b : time := 1000.0 / 100 * 10 ps;
+begin
+end;
diff --git a/testsuite/gna/issue143/testsuite.sh b/testsuite/gna/issue143/testsuite.sh
new file mode 100755
index 000000000..819714d59
--- /dev/null
+++ b/testsuite/gna/issue143/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_failure universal_conversion_tb.vhd
+analyze_failure repro.vhdl
+
+clean
+
+echo "Test successful"
diff --git a/testsuite/gna/issue143/universal_conversion_tb.vhd b/testsuite/gna/issue143/universal_conversion_tb.vhd
new file mode 100644
index 000000000..ba8915f4e
--- /dev/null
+++ b/testsuite/gna/issue143/universal_conversion_tb.vhd
@@ -0,0 +1,24 @@
+use std.textio.all;
+
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity universal_conversion_tb is
+end universal_conversion_tb;
+
+architecture test of universal_conversion_tb is
+
+ constant TEST_VAL : time := 1000.0/100 * 1 ns;
+
+begin
+
+ process
+ variable l : line;
+ begin
+ write(l, string'("TEST_VAL = "));
+ write(l, TEST_VAL);
+ writeline(output, l);
+ wait;
+ end process;
+
+end;