From a50d94cacf00abb828f4a24ca630b3438100b396 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 24 Jan 2016 05:46:50 +0100 Subject: Add testcase for incorrect syntax in physical type. --- testsuite/gna/bug036/phys.vhdl | 7 +++++++ testsuite/gna/bug036/phys2.vhdl | 9 +++++++++ testsuite/gna/bug036/testsuite.sh | 10 ++++++++++ 3 files changed, 26 insertions(+) create mode 100644 testsuite/gna/bug036/phys.vhdl create mode 100644 testsuite/gna/bug036/phys2.vhdl create mode 100755 testsuite/gna/bug036/testsuite.sh diff --git a/testsuite/gna/bug036/phys.vhdl b/testsuite/gna/bug036/phys.vhdl new file mode 100644 index 0000000..eca17cc --- /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 0000000..c86674f --- /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 0000000..14c3f0d --- /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" -- cgit