diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-07-30 07:18:19 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-07-30 07:18:19 +0200 |
commit | 6e8a4c5c65e2b7487d9e612eb3794bb1b4baac84 (patch) | |
tree | 43205c96b88a0a327c87a94effb40930eac8706c /testsuite/gna/bug048 | |
parent | bcc65a1b73b1ca088100e71f60bf82f6e06bb54e (diff) | |
download | ghdl-6e8a4c5c65e2b7487d9e612eb3794bb1b4baac84.tar.gz ghdl-6e8a4c5c65e2b7487d9e612eb3794bb1b4baac84.tar.bz2 ghdl-6e8a4c5c65e2b7487d9e612eb3794bb1b4baac84.zip |
Add testcase for previous patch.
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" |