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 an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

BOOST_ERROR

BOOST_ERROR(message);

BOOST_ERROR tool behave the same way as BOOST_TEST(false, message). This tool is used for an unconditional error counter increasing and message logging.

The tool's only parameter is an error message to log.

Example: BOOST_ERROR usage

Code

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

BOOST_AUTO_TEST_CASE( test )
{
  BOOST_ERROR( "Nothing to test" );
}

Output

> example
Running 1 test case...
test.cpp(8): error in "test": Nothing to test

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

See also:


PrevUpHomeNext