...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
BOOST_WARN_GT(left, right); BOOST_CHECK_GT(left, right); BOOST_REQUIRE_GT(left, right);
Check performed by these tools is the same as the one performed by BOOST_<level>
( left > right
)
. The difference is that the argument
values are reported as well.
Code |
---|
#define BOOST_TEST_MODULE example #include <boost/test/included/unit_test.hpp> BOOST_AUTO_TEST_CASE( test ) { int i = 2; int j = 14; BOOST_CHECK_GT( i, j ); } |
Output |
---|
>example Running 1 test case... test.cpp(10): error in "test": check i > j failed [2 < 14] *** 1 failures is detected in test suite "example" |
See also: