June 2025
Intermediate to advanced
1093 pages
33h 24m
English
You have encountered BOOST_CHECK(b). This basic macro checks if its parameter is true. If not, it marks the test as failed, but the test continues to run. If you use BOOST_REQUIRE(b) instead, the test will abort on false, and the remaining assertions of this test will not be executed. With BOOST_WARN(b), on the other hand, you will receive a message on false, but the test does not fail. These are the three assertion levels consistently supported by Boost.Test. All assertion helper macros are available in these three variants.
I use BOOST_level_EQUAL(res, exp) most frequently. Here I specify the actual result with res and the expected result with exp. The comparison using == is handled by the framework for ...
Read now
Unlock full access