aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/gna/issue2115/testsuite.sh15
-rw-r--r--testsuite/gna/issue2115/tst08.vhdl24
-rw-r--r--testsuite/gna/issue2115/tst93.vhdl21
3 files changed, 53 insertions, 7 deletions
diff --git a/testsuite/gna/issue2115/testsuite.sh b/testsuite/gna/issue2115/testsuite.sh
index c562f1efd..9fbe06a6c 100755
--- a/testsuite/gna/issue2115/testsuite.sh
+++ b/testsuite/gna/issue2115/testsuite.sh
@@ -4,15 +4,16 @@
export GHDL_STD_FLAGS=--std=08
analyze ent.vhdl
-elab_simulate ent > ent.out
+elab_simulate ent
-if grep TRUE ent.out; then
- exit 1
-fi
+analyze tst08.vhdl
+elab_simulate tst08
-if grep FALSE ent.out; then
- exit 1
-fi
+clean
+
+export GHDL_STD_FLAGS=--std=93
+analyze tst93.vhdl
+elab_simulate tst93
clean
diff --git a/testsuite/gna/issue2115/tst08.vhdl b/testsuite/gna/issue2115/tst08.vhdl
new file mode 100644
index 000000000..57ccfda2a
--- /dev/null
+++ b/testsuite/gna/issue2115/tst08.vhdl
@@ -0,0 +1,24 @@
+entity tst08 is
+end entity;
+
+use std.textio.all;
+
+architecture a of tst08 is
+begin
+ process
+ variable l : line;
+ begin
+ write(l, false);
+ assert l.all = "false" severity failure;
+ deallocate (l);
+ write(l, true);
+ assert l.all = "true" severity failure;
+
+ assert boolean'image(true) = "true" severity failure;
+ assert boolean'image(false) = "false" severity failure;
+
+ assert to_string(true) = "true" severity failure;
+ assert to_string(false) = "false" severity failure;
+ wait;
+ end process;
+end;
diff --git a/testsuite/gna/issue2115/tst93.vhdl b/testsuite/gna/issue2115/tst93.vhdl
new file mode 100644
index 000000000..5fb36fbb8
--- /dev/null
+++ b/testsuite/gna/issue2115/tst93.vhdl
@@ -0,0 +1,21 @@
+entity tst93 is
+end entity;
+
+use std.textio.all;
+
+architecture a of tst93 is
+begin
+ process
+ variable l : line;
+ begin
+ write(l, false);
+ assert l.all = "FALSE" severity failure;
+ deallocate (l);
+ write(l, true);
+ assert l.all = "TRUE" severity failure;
+
+ assert boolean'image(true) = "true" severity failure;
+ assert boolean'image(false) = "false" severity failure;
+ wait;
+ end process;
+end;