diff options
author | Yann Herklotz <git@yannherklotz.com> | 2020-06-12 11:55:16 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2020-06-12 11:55:16 +0100 |
commit | c358d4a8fc6073b24c3f270d0525644b03a4f291 (patch) | |
tree | 1c1d08c026d6daf0af407ba072761cac03df6e08 /test | |
parent | d4a2e1ced4deabe9be6b32919cc4c1499751c433 (diff) | |
download | vericert-c358d4a8fc6073b24c3f270d0525644b03a4f291.tar.gz vericert-c358d4a8fc6073b24c3f270d0525644b03a4f291.zip |
Add array to test
Diffstat (limited to 'test')
-rw-r--r-- | test/array.c | 4 | ||||
-rwxr-xr-x | test/test_all.sh | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/test/array.c b/test/array.c new file mode 100644 index 0000000..e33d47b --- /dev/null +++ b/test/array.c @@ -0,0 +1,4 @@ +int main() { + int x[5] = {1, 2, 3, 4, 5}; + return x[2]; +} diff --git a/test/test_all.sh b/test/test_all.sh index 67b5c8f..371ed0e 100755 --- a/test/test_all.sh +++ b/test/test_all.sh @@ -30,7 +30,7 @@ for cfile in $test_dir/*.c; do gcc -o $outbase.gcc $cfile $outbase.gcc expected=$? - ./bin/coqup --hls -drtl -o $outbase.v $cfile + ./bin/coqup -drtl -o $outbase.v $cfile iverilog -o $outbase.iverilog $outbase.v actual=$($outbase.iverilog | sed -E -e 's/[^0-9]+([0-9]+)/\1/') if [[ $expected = $actual ]]; then |