diff options
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" |