aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-03-12 18:52:27 +0100
committerTristan Gingold <tgingold@free.fr>2019-03-14 07:14:44 +0100
commit4072f59cac54cf35d83d7bf8a1ca26eeeb25831a (patch)
tree10f3353d00c2126917b310d9b61815625f9c4328 /testsuite/gna
parentef5e4519b086225f4b2ae172c5b8b7d23f0ab796 (diff)
downloadghdl-4072f59cac54cf35d83d7bf8a1ca26eeeb25831a.tar.gz
ghdl-4072f59cac54cf35d83d7bf8a1ca26eeeb25831a.tar.bz2
ghdl-4072f59cac54cf35d83d7bf8a1ca26eeeb25831a.zip
Add testcase for #777
Diffstat (limited to 'testsuite/gna')
-rw-r--r--testsuite/gna/issue777/a.vhdl16
-rwxr-xr-xtestsuite/gna/issue777/sim.sh2
-rw-r--r--testsuite/gna/issue777/tb.vhdl12
-rwxr-xr-xtestsuite/gna/issue777/testsuite.sh13
4 files changed, 43 insertions, 0 deletions
diff --git a/testsuite/gna/issue777/a.vhdl b/testsuite/gna/issue777/a.vhdl
new file mode 100644
index 000000000..fd6434375
--- /dev/null
+++ b/testsuite/gna/issue777/a.vhdl
@@ -0,0 +1,16 @@
+entity a is
+
+ port (
+ i : in boolean := true
+ );
+
+end entity a;
+
+architecture functional of a is
+
+begin -- architecture functional
+
+ b1 : entity work.b
+ port map (i => i);
+
+end architecture functional;
diff --git a/testsuite/gna/issue777/sim.sh b/testsuite/gna/issue777/sim.sh
new file mode 100755
index 000000000..547e23d45
--- /dev/null
+++ b/testsuite/gna/issue777/sim.sh
@@ -0,0 +1,2 @@
+ghdl_mcode -i --work=build --workdir=. tb.vhdl a.vhdl
+ghdl_mcode -c --work=build --workdir=. -r tb
diff --git a/testsuite/gna/issue777/tb.vhdl b/testsuite/gna/issue777/tb.vhdl
new file mode 100644
index 000000000..6a4b10cb4
--- /dev/null
+++ b/testsuite/gna/issue777/tb.vhdl
@@ -0,0 +1,12 @@
+entity tb is
+
+end entity tb;
+
+architecture functional of tb is
+
+begin -- architecture functional
+
+ dut : entity work.a
+ port map (i => true);
+
+end architecture functional;
diff --git a/testsuite/gna/issue777/testsuite.sh b/testsuite/gna/issue777/testsuite.sh
new file mode 100755
index 000000000..701ba40ea
--- /dev/null
+++ b/testsuite/gna/issue777/testsuite.sh
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+$GHDL -i tb.vhdl a.vhdl
+if $GHDL -c -e tb; then
+ echo "failure expected"
+ exit 1;
+fi
+
+clean
+
+echo "Test successful"