aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-10-07 20:42:21 +0200
committerTristan Gingold <tgingold@free.fr>2019-10-07 20:42:21 +0200
commitddcfde04823b714ea972c61cd368ca513acc648e (patch)
treedf99f6cdc4725e5746fdd47681190f88ec1eb589 /testsuite
parent4f695902d589085bb0266294432453277455a102 (diff)
downloadghdl-ddcfde04823b714ea972c61cd368ca513acc648e.tar.gz
ghdl-ddcfde04823b714ea972c61cd368ca513acc648e.tar.bz2
ghdl-ddcfde04823b714ea972c61cd368ca513acc648e.zip
testsuite/synth: add test for previous commit.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/synth/synth52/pkg_test.vhdl13
-rw-r--r--testsuite/synth/synth52/sample_pkg.vhdl7
-rwxr-xr-xtestsuite/synth/synth52/testsuite.sh7
3 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/synth/synth52/pkg_test.vhdl b/testsuite/synth/synth52/pkg_test.vhdl
new file mode 100644
index 000000000..820e0b84a
--- /dev/null
+++ b/testsuite/synth/synth52/pkg_test.vhdl
@@ -0,0 +1,13 @@
+library work;
+ use work.sample_pkg.all;
+
+entity pkg_test is
+ port (
+ o : out integer
+ );
+end pkg_test;
+
+architecture rtl of pkg_test is
+begin
+ o <= SAMPLE_CONSTANT;
+end rtl;
diff --git a/testsuite/synth/synth52/sample_pkg.vhdl b/testsuite/synth/synth52/sample_pkg.vhdl
new file mode 100644
index 000000000..3f47ca6c2
--- /dev/null
+++ b/testsuite/synth/synth52/sample_pkg.vhdl
@@ -0,0 +1,7 @@
+package sample_pkg is
+ constant SAMPLE_CONSTANT : integer;
+end sample_pkg;
+
+package body sample_pkg is
+ constant SAMPLE_CONSTANT : integer := 160;
+end sample_pkg;
diff --git a/testsuite/synth/synth52/testsuite.sh b/testsuite/synth/synth52/testsuite.sh
new file mode 100755
index 000000000..683b26cbc
--- /dev/null
+++ b/testsuite/synth/synth52/testsuite.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+synth sample_pkg.vhdl pkg_test.vhdl -e pkg_test > syn_pkg_test.vhdl
+
+echo "Test successful"