Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards


Assertion severity level

There are three levels of assertions and all the testing tools are supplied in these three flavours/levels. These levels have different meaning on the consistency of the test case:

For example:

These three levels of assertions are filtered by the framework and reported into the test log and output:

  1. If an assertion designated by the tool passes, confirmation message can be printed in log output [7].
  2. If an assertion designated by the tool fails, the following will happen, depending on the assertion level [8]:

Table 3. Assertions severity levels


Test log content

Errors counter

Test execution


warning in <test-case-name>: condition <assertion description> is not satisfied

not affected



error in <test-case-name>: test <assertion description> failed




fatal error in <test-case-name>: critical test <assertion description> failed



The granularity of the report depends on the current log level and report level.

[Note] Note

in the above table, the test execution is related to the current test case only. Hence "aborts" means that the current test case is aborted, but other test cases in the test tree are still executed.

[6] BOOST_TEST is equivalent to BOOST_TEST_CHECK

[7] to manage what messages appear in the test log stream, set the proper log_level

[8] in some cases log message can be slightly different to reflect failed tool specifics, see here