rohd-vf
rohd-vf copied to clipboard
Add an "expect" type of function connected to logging infrastructure
Motivation
When you write tests in Dart, you can use things like expect to ensure something is true or else fail the test. In ROHD-VF, the preferred mechanism is to use logger.severe or logger.shout (or as configured for error/fatal) instead. This allows the test to not immediately fail out, resulting in things like continuing on error, not corrupting the VCD file generated for waves, etc. However, this results in a pattern difference from:
expect(a, 1);
to:
if(a != 1) {
logger.severe('a must be 1');
}
It would be nice if we had a mechanism built-in to ROHD-VF that was similar to expect.
Desired solution
Add some functions to ROHD-VF that "feel" more like expect
Alternatives considered
No response
Additional details
No response