aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/assertassumes0/testsuite.sh
diff options
context:
space:
mode:
authortmeissner <programming@goodcleanfun.de>2020-12-31 22:28:43 +0100
committertgingold <tgingold@users.noreply.github.com>2021-01-02 08:35:20 +0100
commit36ae5c1f75b11a36fad9ef95881a99128db19f26 (patch)
treec3e5c7fe0ea638756cc25c24996b04e48ab96a35 /testsuite/synth/assertassumes0/testsuite.sh
parentb423d31131ccc695de3b3015b91307e9e72ae821 (diff)
downloadghdl-36ae5c1f75b11a36fad9ef95881a99128db19f26.tar.gz
ghdl-36ae5c1f75b11a36fad9ef95881a99128db19f26.tar.bz2
ghdl-36ae5c1f75b11a36fad9ef95881a99128db19f26.zip
synth: add option to treat asserts as assumes and vice-versa
Diffstat (limited to 'testsuite/synth/assertassumes0/testsuite.sh')
-rwxr-xr-xtestsuite/synth/assertassumes0/testsuite.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/testsuite/synth/assertassumes0/testsuite.sh b/testsuite/synth/assertassumes0/testsuite.sh
new file mode 100755
index 000000000..68d3ae989
--- /dev/null
+++ b/testsuite/synth/assertassumes0/testsuite.sh
@@ -0,0 +1,36 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+UNIT=assert0
+GHDL_STD_FLAGS=--std=08
+
+synth_only $UNIT
+
+# There should be no assume gate without assert-assume option.
+if grep -q -e "-- assume" syn_$UNIT.vhdl; then
+ exit 1
+fi
+
+# There should be an assert gate without assert-assume option.
+if ! grep -q -e "-- assert" syn_$UNIT.vhdl; then
+ exit 1
+fi
+
+GHDL_FLAGS=--assert-assumes
+
+synth_only $UNIT
+
+# There should be an assume gate with assert-assume option.
+if ! grep -q -e "-- assume" syn_$UNIT.vhdl; then
+ exit 1
+fi
+
+# There should be no assert gate with assert-assume option.
+if grep -q -e "-- assert" syn_$UNIT.vhdl; then
+ exit 1
+fi
+
+clean
+
+echo "Test successful"