NO_FILES_WARNING="Warning: No input files specified (try \`sv2v --help\`)"
NO_FILES_WARNING="Warning: No input files specified (try \`sv2v --help\`)"
PACKAGE_WARNING="Warning: Source includes packages but no modules. Please convert packages alongside the modules that use them."
PACKAGE_WARNING="Warning: Source includes packages but no modules. Please convert packages alongside the modules that use them."
INTERFACE_WARNING="Warning: Source includes an interface but output is empty because there is no top-level module which has no ports which are interfaces."
INTERFACE_WARNING="Warning: Source includes an interface but output is empty because there is no top-level module which has no ports which are interfaces."
PORT_CONN_ATTR_WARNING="attr.sv:6:11: Warning: Ignored port connection attributes (* foo *)(* bar *)."
test_default(){
test_default(){
runAndCapture *.sv
runAndCapture interface.sv module.sv package.sv
assertTrue "default conversion should succeed"$result
assertTrue "default conversion should succeed"$result
assertNotNull "stdout should not be empty""$stdout"
assertNotNull "stdout should not be empty""$stdout"
assertNull "stderr should be empty""$stderr"
assertNull "stderr should be empty""$stderr"
...
@@ -18,6 +19,13 @@ test_no_files() {
...
@@ -18,6 +19,13 @@ test_no_files() {
assertEquals "stderr should should have warning""$NO_FILES_WARNING""$stderr"
assertEquals "stderr should should have warning""$NO_FILES_WARNING""$stderr"
}
}
test_port_conn_attr(){
runAndCapture attr.sv
assertTrue "conversion should succeed"$result
assertNotNull "stdout should not be empty""$stdout"
assertEquals "stderr should should have warning""$PORT_CONN_ATTR_WARNING""$stderr"