aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/bug039
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-02-10 20:22:56 +0100
committerTristan Gingold <tgingold@free.fr>2016-02-10 20:22:56 +0100
commit7a09ce2cf8e855d605508266763062aaa855347d (patch)
treeb0a160c4cbbac862298d87d237005464cf16d344 /testsuite/gna/bug039
parentda8142e5ee6eea82e2a49a1232aeb599f0ce801d (diff)
downloadghdl-7a09ce2cf8e855d605508266763062aaa855347d.tar.gz
ghdl-7a09ce2cf8e855d605508266763062aaa855347d.tar.bz2
ghdl-7a09ce2cf8e855d605508266763062aaa855347d.zip
Add testcase for 'value
Diffstat (limited to 'testsuite/gna/bug039')
-rw-r--r--testsuite/gna/bug039/repro.vhdl16
-rwxr-xr-xtestsuite/gna/bug039/testsuite.sh10
2 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/gna/bug039/repro.vhdl b/testsuite/gna/bug039/repro.vhdl
new file mode 100644
index 000000000..a27050c8d
--- /dev/null
+++ b/testsuite/gna/bug039/repro.vhdl
@@ -0,0 +1,16 @@
+entity repro is
+end repro;
+
+architecture behav of repro is
+ constant c1 : character := character'value("ack");
+ constant c2 : character := character'value("'Z'");
+ constant c3 : character := character'value("'a'");
+ constant c4 : boolean := boolean'value("TruE");
+ constant c5 : boolean := boolean'value("TruE ");
+ constant c6 : boolean := boolean'value(" TruE ");
+begin
+ assert c1 = ack report "value incorrect for ack" severity failure;
+ assert c2 = 'Z' report "value incorrect for 'Z'" severity failure;
+ assert c3 = 'a' report "value incorrect for 'a'" severity failure;
+ assert c4 and c5 and c6 severity failure;
+end behav;
diff --git a/testsuite/gna/bug039/testsuite.sh b/testsuite/gna/bug039/testsuite.sh
new file mode 100755
index 000000000..7da7af956
--- /dev/null
+++ b/testsuite/gna/bug039/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze repro.vhdl
+elab_simulate repro
+
+clean
+
+echo "Test successful"