intel / intel/rohd-vf

Add an "expect" type of function connected to logging infrastructure

Open
#61 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Dart
Stars
48
Forks
14
PR merge metrics
No merged PRs in 30d

Description

### 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:
```dart
expect(a, 1);
```
to:
```dart
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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.