Home | Libraries | People | FAQ | More |
When using the library or header-only version of Boost.Test, many assertion macros are provided in three levels that determine the behavior when the assertion fails and how a failed assertion interacts with the test runner.
Table 1.2. Assertion Levels
Level |
Test Case Fails? |
Aborts Execution? |
---|---|---|
|
No |
No |
|
Yes |
no |
|
Yes |
Yes |
The WARN
level issues a diagnostic message, but the
test case is not considered to have failed and continues executing. The
CHECK
level issues a message to the test log on failure,
marks the test case as failed and continues executing. The REQUIRE
level issues a message to the test log on failure, marks the test case
as failed and halts execution of the test case.