2021-03-10 18:26:43 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
test_default() {
|
2021-05-23 21:54:49 +02:00
|
|
|
cs=$SHUNIT_TMPDIR/cs.v
|
|
|
|
|
cv=$SHUNIT_TMPDIR/cv.v
|
2021-08-02 17:18:45 +02:00
|
|
|
convert "standard conversion" $cs package.svh module.sv
|
|
|
|
|
convert "verbose conversion" $cv package.svh module.sv -v
|
2021-05-23 21:54:49 +02:00
|
|
|
simulateAndCompare reference.v $cs $cv "$SCRIPT_DIR/empty.v"
|
2021-03-10 18:26:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
test_siloed() {
|
|
|
|
|
runAndCapture --siloed package.svh module.sv
|
|
|
|
|
assertFalse "siloed conversion should fail" $result
|
|
|
|
|
assertNull "stdout should be empty" "$stdout"
|
|
|
|
|
assertEquals "stderr should have missing macro" \
|
|
|
|
|
"module.sv:8:35: Lexical error: Undefined macro: FANCY_SEEING_YOU" \
|
|
|
|
|
"$stderr"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
source ../lib/functions.sh
|
|
|
|
|
|
|
|
|
|
. shunit2
|