Skip to content

Commit

Permalink
The testharness no longer has a bool return value
Browse files Browse the repository at this point in the history
Most testcases always returned true, and we concluded that returning
false is better replaced with FAIL_TEST since that allows reporting a
reason for the failure.
  • Loading branch information
ojwb committed Mar 27, 2020
1 parent e69c3e2 commit 806619b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/writing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,8 @@ is run.

Look at the bottom of ``tests/stemtest.cc`` for the ``test_desc`` array.
Now look up about 20 lines to where the test functions are defined. You
need to write a function like these which will return true or false
depending on whether it failed or not.

In addition, there are a bunch of macros to help you perform standards
testing tasks. Things like ``TEST_EQUAL`` are all in
need to write a function like these. There are a bunch of macros to help you
perform standards testing tasks, such as ``TEST_EQUAL``, which are all in
``tests/harness/testsuite.h``. They're pretty simple to use.

API tests
Expand Down

0 comments on commit 806619b

Please sign in to comment.