diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-09-24 07:56:47 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-09-24 07:56:47 +0200 |
commit | 67ceca184370d91ce8c08289f21e54de8536311d (patch) | |
tree | 9414a26e6171e87d9537e6b2824ee8f346f8ab79 /testsuite/gna | |
parent | de49b80bd8c4eb64ce3813c5397fb25d6f31c2c4 (diff) | |
download | ghdl-67ceca184370d91ce8c08289f21e54de8536311d.tar.gz ghdl-67ceca184370d91ce8c08289f21e54de8536311d.tar.bz2 ghdl-67ceca184370d91ce8c08289f21e54de8536311d.zip |
testsuite/gna: add a test for #1876
Diffstat (limited to 'testsuite/gna')
-rw-r--r-- | testsuite/gna/issue1876/ent.vhdl | 8 | ||||
-rw-r--r-- | testsuite/gna/issue1876/pkgent.vhdl | 14 | ||||
-rwxr-xr-x | testsuite/gna/issue1876/testsuite.sh | 13 |
3 files changed, 35 insertions, 0 deletions
diff --git a/testsuite/gna/issue1876/ent.vhdl b/testsuite/gna/issue1876/ent.vhdl new file mode 100644 index 000000000..41f2c3b53 --- /dev/null +++ b/testsuite/gna/issue1876/ent.vhdl @@ -0,0 +1,8 @@ +entity ent is + generic ( mygeneric : string ); +end; + +architecture arch of ent is +begin + assert mygeneric = "Hello" report "Generic mygeneric is not 'Hello'!" severity failure; +end; diff --git a/testsuite/gna/issue1876/pkgent.vhdl b/testsuite/gna/issue1876/pkgent.vhdl new file mode 100644 index 000000000..546a8a342 --- /dev/null +++ b/testsuite/gna/issue1876/pkgent.vhdl @@ -0,0 +1,14 @@ +package pkg is + subtype runner_cfg_t is string; +end; + +use work.pkg.runner_cfg_t; + +entity pkgent is + generic ( mygeneric : runner_cfg_t ); +end; + +architecture arch of pkgent is +begin + assert mygeneric = "Hello" report "Generic mygeneric is not 'Hello'!" severity failure; +end; diff --git a/testsuite/gna/issue1876/testsuite.sh b/testsuite/gna/issue1876/testsuite.sh new file mode 100755 index 000000000..d29cd8c67 --- /dev/null +++ b/testsuite/gna/issue1876/testsuite.sh @@ -0,0 +1,13 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze ent.vhdl +elab_simulate ent -gmygeneric="Hello" +analyze pkgent.vhdl +elab_simulate pkgent -gmygeneric="Hello" + +clean + +echo "Test successful" |