Home > The Unit Test Framework > User's guide > Test Output > Test log > BOOST_TEST_PASSPOINT
PrevNext

BOOST_TEST_PASSPOINT

The macro BOOST_TEST_PASSPOINT is intended to be used to inject an "unnamed" checkpoint position. The macro signature is as follows:

BOOST_TEST_PASSPOINT()

Unlike the macro BOOST_TEST_CHECKPOINT this macro doesn't require any message to be supplied with it. It's just a simple "been there" marker that records file name and line number code passes through.

Example 29. BOOST_TEST_PASSPOINT usage

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

//____________________________________________________________________________//

BOOST_AUTO_TEST_CASE( test_case )
{
    int* p = 0;

    BOOST_TEST_PASSPOINT();
    ++p;

    BOOST_TEST_PASSPOINT();
    ++p;

    BOOST_TEST_PASSPOINT();
    int j = *p;
}

//____________________________________________________________________________//
Source code | Show output
> example
Running 1 test case...
unknown location(0): fatal error in "test_case": memory access violation at address: 0x00000008: no mapping at fault address
test.cpp(16): last checkpoint

*** 1 failure detected in test suite "example"


PrevUpHomeNext