mirror of https://github.com/zachjs/sv2v.git
cover --exclude assert in tests
This commit is contained in:
parent
52197df325
commit
e3feeff152
|
|
@ -1,8 +1,24 @@
|
||||||
#!/bin/bash
|
#!/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() {
|
addTest() {
|
||||||
test=$1
|
test=$1
|
||||||
eval "test_$test() { assertConverts $test.sv; }"
|
eval "test_$test() { runNoSimTest $test; }"
|
||||||
suite_addTest test_$test
|
suite_addTest test_$test
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue