diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-02-21 04:44:28 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-02-21 04:47:56 +0100 |
commit | 58e1d46280fa86b0c369d9134d51b90771b9a25c (patch) | |
tree | 16465c8ce72afa3cd9bfcca56cac5d45d34f2b6a /testsuite/gna/issue238 | |
parent | bc78710187b5875d40d4b539b81da5ec464c508d (diff) | |
download | ghdl-58e1d46280fa86b0c369d9134d51b90771b9a25c.tar.gz ghdl-58e1d46280fa86b0c369d9134d51b90771b9a25c.tar.bz2 ghdl-58e1d46280fa86b0c369d9134d51b90771b9a25c.zip |
unbounded records: add more tests.
Diffstat (limited to 'testsuite/gna/issue238')
-rw-r--r-- | testsuite/gna/issue238/call3.vhdl | 21 | ||||
-rw-r--r-- | testsuite/gna/issue238/call4.vhdl | 21 | ||||
-rw-r--r-- | testsuite/gna/issue238/call5.vhdl | 27 | ||||
-rwxr-xr-x | testsuite/gna/issue238/testsuite.sh | 9 |
4 files changed, 78 insertions, 0 deletions
diff --git a/testsuite/gna/issue238/call3.vhdl b/testsuite/gna/issue238/call3.vhdl new file mode 100644 index 000000000..99006447d --- /dev/null +++ b/testsuite/gna/issue238/call3.vhdl @@ -0,0 +1,21 @@ +entity call3 is +end; + +use work.pkg.all; + +architecture behav of call3 is + procedure p (a : rec) is + begin + report natural'image (a.s'left); + report natural'image (a.s'right); + assert a.s'left = 1; + assert a.s'right = 4; + end; +begin + process + variable v : rec_4dyn; + begin + p (v); + wait; + end process; +end behav; diff --git a/testsuite/gna/issue238/call4.vhdl b/testsuite/gna/issue238/call4.vhdl new file mode 100644 index 000000000..e40a98489 --- /dev/null +++ b/testsuite/gna/issue238/call4.vhdl @@ -0,0 +1,21 @@ +entity call4 is +end; + +use work.pkg.all; + +architecture behav of call4 is + procedure p (s : string) is + begin + report natural'image (s'left); + report natural'image (s'right); + assert s'left = 1; + assert s'right = 4; + end; +begin + process + variable v : rec_4dyn; + begin + p (v.s); + wait; + end process; +end behav; diff --git a/testsuite/gna/issue238/call5.vhdl b/testsuite/gna/issue238/call5.vhdl new file mode 100644 index 000000000..0897bfee0 --- /dev/null +++ b/testsuite/gna/issue238/call5.vhdl @@ -0,0 +1,27 @@ +entity call5 is +end; + +use work.pkg.all; + +architecture behav of call5 is + procedure p2 (s : string) is + begin + report natural'image (s'left); + report natural'image (s'right); + assert s'left = 1; + assert s'right = 4; + end; + + procedure p1 (r : rec) is + begin + p2 (r.s); + end p1; + +begin + process + variable v : rec_4dyn; + begin + p1 (v); + wait; + end process; +end behav; diff --git a/testsuite/gna/issue238/testsuite.sh b/testsuite/gna/issue238/testsuite.sh index 9c17b1ff2..2fb8c33bb 100755 --- a/testsuite/gna/issue238/testsuite.sh +++ b/testsuite/gna/issue238/testsuite.sh @@ -20,6 +20,15 @@ elab_simulate call1 analyze call2.vhdl elab_simulate call2 +analyze call3.vhdl +elab_simulate call3 + +analyze call4.vhdl +elab_simulate call4 + +analyze call5.vhdl +elab_simulate call5 + clean echo "Test successful" |