Skip to content

Commit

Permalink
cover --exclude assert in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zachjs committed Jun 23, 2024
1 parent 52197df commit e3feeff
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion test/nosim/run.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
#!/bin/bash

runNoSimTest() {
file=$1.sv
assertConverts $file

tmp_ref=$SHUNIT_TMPDIR/no-sim-ref.sv
tmp_int=$SHUNIT_TMPDIR/no-sim-int.sv
tmp_alt=$SHUNIT_TMPDIR/no-sim-alt.sv

convert "reference $file" $tmp_ref $file
convert "intermediate $file" $tmp_int --exclude assert $file
convert "alternate $file" $tmp_alt $tmp_int

diff --unified $tmp_ref $tmp_alt
assertTrue "reference and alternate conversion differs for $file" $?
}

addTest() {
test=$1
eval "test_$test() { assertConverts $test.sv; }"
eval "test_$test() { runNoSimTest $test; }"
suite_addTest test_$test
}

Expand Down

0 comments on commit e3feeff

Please sign in to comment.