aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-01-24 05:46:50 +0100
committerTristan Gingold <tgingold@free.fr>2016-01-24 12:11:45 +0100
commita50d94cacf00abb828f4a24ca630b3438100b396 (patch)
treede41397c546bf03ce5b60a5b037b8b1f774fc9af /testsuite
parentcd068a5566866dbddffd51ecadc50d601e000d3e (diff)
downloadghdl-a50d94cacf00abb828f4a24ca630b3438100b396.tar.gz
ghdl-a50d94cacf00abb828f4a24ca630b3438100b396.tar.bz2
ghdl-a50d94cacf00abb828f4a24ca630b3438100b396.zip
Add testcase for incorrect syntax in physical type.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/bug036/phys.vhdl7
-rw-r--r--testsuite/gna/bug036/phys2.vhdl9
-rwxr-xr-xtestsuite/gna/bug036/testsuite.sh10
3 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/gna/bug036/phys.vhdl b/testsuite/gna/bug036/phys.vhdl
new file mode 100644
index 000000000..eca17cc20
--- /dev/null
+++ b/testsuite/gna/bug036/phys.vhdl
@@ -0,0 +1,7 @@
+package phys is
+type ANGLE is range INTEGER'range units
+ sec;
+ min = 60 sec;
+ deg = 60 min;
+end units;
+end phys;
diff --git a/testsuite/gna/bug036/phys2.vhdl b/testsuite/gna/bug036/phys2.vhdl
new file mode 100644
index 000000000..c86674f8b
--- /dev/null
+++ b/testsuite/gna/bug036/phys2.vhdl
@@ -0,0 +1,9 @@
+package phys2 is
+ subtype mybv is bit_vector (0 to 3600000);
+
+ type ANGLE is range mybv'range units
+ sec;
+ min = 60 sec;
+ deg = 60 min;
+ end units;
+end phys2;
diff --git a/testsuite/gna/bug036/testsuite.sh b/testsuite/gna/bug036/testsuite.sh
new file mode 100755
index 000000000..14c3f0d76
--- /dev/null
+++ b/testsuite/gna/bug036/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_failure phys.vhdl
+analyze phys2.vhdl
+
+clean
+
+echo "Test successful"