BOOST_WARN( predicate )

This tool is used to perform a weak validation of the predicate. This check failure does not cause the test case to fail, but only warning message logged in test output stream. Use this tool to validate aspects less important then correctness: performance, portability, usability etc.

If predicate evaluates to true, the tool produces a confirmation message (note: to manage what messages appear in the test output stream set the proper log level), in other case it produces a warning message in a form "warning in <test case name>: condition <predicate> is not satisfied"

Example: test.cpp

int test_main( int, char* [] ) {
    BOOST_WARN( sizeof(int) == sizeof(short) );

    return 0;
}

Output:

test.cpp(2) : warning in test_main: condition sizeof(int) == sizeof(short) is not satisfied

See Also

BOOST_CHECK