BOOST_MESSAGE( message )

This tool is used to log the message in the test output stream. The message is logged as it is without any modifications.

The only tool's parameter is a message to log. The message argument can be of any type and can be a result of concatenations using the operator <<().

Example: test.cpp

struct A {
    friend std::ostream& operator<<( std::ostream& str, A const& a ) {
        str << "struct A";
        
        return str;
    }
};

int test_main( int, char* [] ) {
    BOOST_MESSAGE( "Starting test" );

    int i = 2;
    BOOST_MESSAGE( "i=" << i );

    BOOST_MESSAGE( "still testing..." );

    struct A a;
    BOOST_MESSAGE( a << '.' );

    return 0;
}

Output:

Starting test
i=2
still testing...
struct A.

See Also

BOOST_CHECK_MESSAGE