diff options
author | Tristan Gingold | 2015-05-14 22:02:11 +0200 |
---|---|---|
committer | Tristan Gingold | 2015-05-14 22:02:11 +0200 |
commit | ca93319348bd9ae8f23dda91b85fb4dbd8c2f8ef (patch) | |
tree | b7de86eb157a3e9cc5013e2267c2187683c4d607 /testsuite/gna/ticket61 | |
parent | 15c60251e6d7f3d7f3aaa0a379f24f076e6bc047 (diff) | |
download | ghdl-ca93319348bd9ae8f23dda91b85fb4dbd8c2f8ef.tar.gz ghdl-ca93319348bd9ae8f23dda91b85fb4dbd8c2f8ef.tar.bz2 ghdl-ca93319348bd9ae8f23dda91b85fb4dbd8c2f8ef.zip |
Testcase for ticket 61.
Diffstat (limited to 'testsuite/gna/ticket61')
-rw-r--r-- | testsuite/gna/ticket61/bug.vhdl | 34 | ||||
-rwxr-xr-x | testsuite/gna/ticket61/testsuite.sh | 11 |
2 files changed, 45 insertions, 0 deletions
diff --git a/testsuite/gna/ticket61/bug.vhdl b/testsuite/gna/ticket61/bug.vhdl new file mode 100644 index 0000000..c4a4224 --- /dev/null +++ b/testsuite/gna/ticket61/bug.vhdl @@ -0,0 +1,34 @@ +entity ent is +end entity; + +architecture a of ent is +begin + main : process is + constant c : boolean := false; + variable v : boolean; + + type enum is (a, b, short, \Extended\, \Weird\\Name\); + variable e : enum; + begin + report to_string(c); -- Cause TYPES.INTERNAL_ERROR + report to_string(false); -- Cause TYPES.INTERNAL_ERROR + report to_string(integer'(1)); -- Cause TYPES.INTERNAL_ERROR + report to_string(v); -- Works + report to_string(\Extended\); + report to_string(\Weird\\Name\); + + assert to_string(CR) = (1 => CR) severity failure; + assert to_string(integer'(1)) = "1" severity failure; + assert to_string(integer'(-12)) = "-12" severity failure; + assert to_string(FaLse) = "false" severity failure; + + assert to_string (\Extended\) = "Extended" severity failure; + assert to_string(\Weird\\Name\) = "Weird\Name" severity failure; + assert enum'image(\Weird\\Name\) = "\Weird\\Name\" severity failure; + e := \Weird\\Name\; + assert enum'image(e) = "\Weird\\Name\" severity failure; + report to_string(e); + assert to_string(e) = "Weird\Name" severity failure; + wait; + end process; +end architecture; diff --git a/testsuite/gna/ticket61/testsuite.sh b/testsuite/gna/ticket61/testsuite.sh new file mode 100755 index 0000000..6589b7c --- /dev/null +++ b/testsuite/gna/ticket61/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +GHDL_STD_FLAGS=--std=08 + +analyze bug.vhdl +elab_simulate ent +clean + +echo "Test successful" |