Skip to content

Commit

Permalink
Add ASSERT to Macro test
Browse files Browse the repository at this point in the history
  • Loading branch information
ping-ee committed Sep 23, 2024
1 parent f9e5007 commit 9594a8d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions test/Adder_KO_testsuite.sv
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ module Adder_unit_test_KO;
`FAIL_IF_NOT_EQUAL(out, 8'd0);
`INFO("Test FAIL_IF_NOT_EQUAL");
`FAIL_IF_EQUAL(out, 8'd1);
`INFO("Test ASSERT");
`ASSERT(inc === 1'b1);

`ERROR("Test finished");

Expand Down
2 changes: 2 additions & 0 deletions test/Adder_OK_testsuite.sv
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ module Adder_unit_test_OK;
`FAIL_IF_EQUAL(out, 8'd0);
`INFO("Test FAIL_IF_NOT_EQUAL");
`FAIL_IF_NOT_EQUAL(out, 8'd1);
`INFO("Test ASSERT");
`ASSERT(inc === 1'b0);

`SUCCESS("Test finished");

Expand Down
2 changes: 1 addition & 1 deletion test/testsuite_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test_run_ko_testsuite() { #@test
test_run_ko_testsuite_error_count() { #@test

run exe_ko_to_log
error_num=9
error_num=10
[ $(grep -c "ERROR:" log) -eq "$error_num" ]
}

Expand Down

0 comments on commit 9594a8d

Please sign in to comment.