BOOST_FAIL( message )

BOOST_FAIL behave the same way as BOOST_REQUIRE_MESSAGE( false, message ). This tool is used for an unconditional error message logging and the current test case aborting.

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

Example: test.cpp

#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_CASE( test ) { BOOST_FAIL( "Test is not ready yet" ); }

Output:

Running 1 test case...
test.cpp(6): fatal error in "test": Test is not ready yet

*** 1 failure detected in test suite "Master Test Suite"

See Also

BOOST_REQUIRE_MESSAGE