mirror of
https://github.com/zachjs/sv2v.git
synced 2026-08-29 09:09:47 +02:00
cover --exclude assert in tests
This commit is contained in:
+17
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user