diff --git a/tests/test_assert_immediate.py b/tests/test_assert_immediate.py index 6618d3e8..d8569684 100644 --- a/tests/test_assert_immediate.py +++ b/tests/test_assert_immediate.py @@ -58,10 +58,11 @@ class Foo(m.Circuit): "error": "%Error:", }[severity] msg += " Foo.v:9: " - # TODO: verilator 5.016 needs this - # if severity == "error": - # msg += "Assertion failed in " - msg += "Assertion failed in " + if verilator_version() >= 5.016: + if severity == "error": + msg += "Assertion failed in " + else: + msg += "Assertion failed in " msg += "TOP.Foo" if name is not None: msg += f".{name}"