cover --exclude assert in tests

This commit is contained in:
Zachary Snow 2024-06-23 14:47:54 -04:00
parent 52197df325
commit e3feeff152
1 changed files with 17 additions and 1 deletions

View File

@ -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
}