Skip to content

Commit

Permalink
Add example of new macros
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarah Clark committed Aug 1, 2019
1 parent 563ef3d commit f9ac15e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ ENV/
# Editing
.vscode

# Regression testing
test/a.out
# Testing artifacts
a.out
dump.vcd
test/regression.txt
test/dump.vcd
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,4 @@ GTKWave should open up without problems :)
# TODO

- [ ] Add [Verilator](https://www.veripool.org/wiki/verilator) support
- [X] Add JUnit-style macros, including optional names on tests and test suites.
5 changes: 4 additions & 1 deletion example/ffd_tb.sv
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,13 @@ module ffd_tb;
- `WARNING("message"); Print an orange message and increment warning counter
- `CRITICAL("message"); Print an pink message and increment critical counter
- `ERROR("message"); Print a red message and increment error counter
- `FAIL_IF(aSignal); Increment error counter if evaluaton is positive
- `ASSERT(aSignal, [reason]); Same as FAIL_IF, reason string is optional
- `FAIL_IF_NOT(aSignal); Increment error coutner if evaluation is false
- `FAIL_IF_EQUAL(aSignal, 23); Increment error counter if evaluation is equal
- `FAIL_IF_NOT_EQUAL(aSignal, 45); Increment error counter if evaluation is not equal
- `ASSERT_EQUAL(aSignal, value, [reason]); Same as FAIL_IF_NOT_EQUAL, with optional reason
*/

/* Available flag:
Expand All @@ -77,7 +80,7 @@ module ffd_tb;
*/

// WAS: UNIT_TEST
`NAMED_TEST("TEST_IF_RESET_IS_APPLIED_WELL")
`NAMED_TEST("Test if reset is applied well")

`ASSERT(q);

Expand Down

0 comments on commit f9ac15e

Please sign in to comment.