diff options
Diffstat (limited to 'testsuite/gna/bug048')
-rw-r--r-- | testsuite/gna/bug048/leftof1.vhdl | 22 | ||||
-rw-r--r-- | testsuite/gna/bug048/leftof2.vhdl | 21 | ||||
-rw-r--r-- | testsuite/gna/bug048/leftof3.vhdl | 15 | ||||
-rwxr-xr-x | testsuite/gna/bug048/testsuite.sh | 16 |
4 files changed, 74 insertions, 0 deletions
diff --git a/testsuite/gna/bug048/leftof1.vhdl b/testsuite/gna/bug048/leftof1.vhdl new file mode 100644 index 000000000..666ecc3fc --- /dev/null +++ b/testsuite/gna/bug048/leftof1.vhdl @@ -0,0 +1,22 @@ +entity leftofrightof is +end entity; + +architecture subclass_constant of leftofrightof is + +begin + + process + constant i: integer := 1; + begin + report "constant i = " & integer'image(i); + report "integer'leftof(i) = " & integer'image(integer'leftof(i)); + wait; + end process; + process + constant j: integer := 1; + begin + report "constant j = " & integer'image(j); + report "integer'rightof(j) = " & integer'image(integer'rightof(j)); + wait; + end process; +end architecture; diff --git a/testsuite/gna/bug048/leftof2.vhdl b/testsuite/gna/bug048/leftof2.vhdl new file mode 100644 index 000000000..2d4b5e56b --- /dev/null +++ b/testsuite/gna/bug048/leftof2.vhdl @@ -0,0 +1,21 @@ +entity leftofrightof is +end entity; + +architecture subclass_variable of leftofrightof is + +begin + process + variable i: integer := 1; + begin + report "variable i = " & integer'image(i); + report "integer'leftof(i) = " & integer'image(integer'leftof(i)); + wait; + end process; + process + variable j: integer := 1; + begin + report "variable j = " & integer'image(j); + report "integer'rightof(j) = " & integer'image(integer'rightof(j)); + wait; + end process; +end architecture; diff --git a/testsuite/gna/bug048/leftof3.vhdl b/testsuite/gna/bug048/leftof3.vhdl new file mode 100644 index 000000000..af2fd34b6 --- /dev/null +++ b/testsuite/gna/bug048/leftof3.vhdl @@ -0,0 +1,15 @@ +entity leftofrightof is +end entity; + +architecture subclass_variable of leftofrightof is + +begin + process + variable i: character := 'e'; + begin + report "i = " & character'image(i); + report "leftof(i) = " & character'image(character'leftof(i)); + report "rightof(i) = " & character'image(character'rightof(i)); + wait; + end process; +end architecture; diff --git a/testsuite/gna/bug048/testsuite.sh b/testsuite/gna/bug048/testsuite.sh new file mode 100755 index 000000000..46e5bb60f --- /dev/null +++ b/testsuite/gna/bug048/testsuite.sh @@ -0,0 +1,16 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze leftof1.vhdl +elab_simulate leftofrightof + +analyze leftof2.vhdl +elab_simulate leftofrightof + +analyze leftof3.vhdl +elab_simulate leftofrightof + +clean + +echo "Test successful" |