From 7a09ce2cf8e855d605508266763062aaa855347d Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 10 Feb 2016 20:22:56 +0100 Subject: Add testcase for 'value --- testsuite/gna/bug039/repro.vhdl | 16 ++++++++++++++++ testsuite/gna/bug039/testsuite.sh | 10 ++++++++++ 2 files changed, 26 insertions(+) create mode 100644 testsuite/gna/bug039/repro.vhdl create mode 100755 testsuite/gna/bug039/testsuite.sh (limited to 'testsuite/gna/bug039') diff --git a/testsuite/gna/bug039/repro.vhdl b/testsuite/gna/bug039/repro.vhdl new file mode 100644 index 000000000..a27050c8d --- /dev/null +++ b/testsuite/gna/bug039/repro.vhdl @@ -0,0 +1,16 @@ +entity repro is +end repro; + +architecture behav of repro is + constant c1 : character := character'value("ack"); + constant c2 : character := character'value("'Z'"); + constant c3 : character := character'value("'a'"); + constant c4 : boolean := boolean'value("TruE"); + constant c5 : boolean := boolean'value("TruE "); + constant c6 : boolean := boolean'value(" TruE "); +begin + assert c1 = ack report "value incorrect for ack" severity failure; + assert c2 = 'Z' report "value incorrect for 'Z'" severity failure; + assert c3 = 'a' report "value incorrect for 'a'" severity failure; + assert c4 and c5 and c6 severity failure; +end behav; diff --git a/testsuite/gna/bug039/testsuite.sh b/testsuite/gna/bug039/testsuite.sh new file mode 100755 index 000000000..7da7af956 --- /dev/null +++ b/testsuite/gna/bug039/testsuite.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze repro.vhdl +elab_simulate repro + +clean + +echo "Test successful" -- cgit v1.2.3