From c358d4a8fc6073b24c3f270d0525644b03a4f291 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 12 Jun 2020 11:55:16 +0100 Subject: Add array to test --- test/array.c | 4 ++++ test/test_all.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 test/array.c 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 -- cgit