Boost C++ Libraries

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

This is the documentation for a snapshot of the master branch, built from commit 1ae620108f.
PrevUpHomeNext

BOOST_<level>_LT

BOOST_WARN_LT(left, right);
BOOST_CHECK_LT(left, right);
BOOST_REQUIRE_LT(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.

Example: BOOST_<level>_LT usage

Code

#define BOOST_TEST_MODULE example
#include <boost/test/included/unit_test.hpp>

BOOST_AUTO_TEST_CASE( test )
{
  int i = 7;
  int j = 7;
  BOOST_CHECK_LT( i, j );
}

Output

>example
Running 1 test case...
test.cpp(10): error in "test": check i < j failed [7 >= 7]

*** 1 failures is detected in test suite "example"

See also:


PrevUpHomeNext