The Test Tools

### BOOST_IS_DEFINED( symbol )

Unlike the rest of the tools in the toolbox this tool does not perform the logging itself. It's only purpose is to check at runtime whether or not the supplied preprocessor symbol is defined. Use it in combination with BOOST_CHECK to perform and log validation. Macros of any arity could be checked. To check the macro definition with non-zero arity specify dummy arguments for it. See below for example.

The only tool's argument is a preprocessor symbol that gets validated.

#### Example: test.cpp

    int test_main( int, char* [] ) {
        BOOST_CHECK( BOOST_IS_DEFINED(SYMBOL1) );
        BOOST_CHECK( BOOST_IS_DEFINED(SYMBOL2(arg)) );

        return 0;
    }

#### Output:

test.cpp(2) : error in test_main: test BOOST_IS_DEFINED(SYMBOL1) failed
test.cpp(3) : error in test_main: test BOOST_IS_DEFINED(SYMBOL2(arg)) failed

#### See Also

BOOST_CHECK