2
0
mirror of https://github.com/boostorg/test.git synced 2026-02-20 15:12:11 +00:00
Files
test/doc/test_output/checkpoints.qbk
2015-05-23 00:34:24 -04:00

52 lines
1.7 KiB
Plaintext

[/
/ Copyright (c) 2001 Boost.Test team
/
/ Distributed under the Boost Software License, Version 1.0. (See accompanying
/ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/]
[section:checkpoints Checkpoints]
Checkpoints may be used to indicate the state of the running test with more granularity in case a fatal
error occurs during the test. The checkpoints are also convenient for checks in loops as they might provide
more information about the occurrence of a failure.
[/ -------------------------------------------------------------------------------------------------- ]
[h3 Named checkpoints]
The macro __BOOST_TEST_CHECKPOINT__ is intended to be used to inject [*named] checkpoint position. The
macro signature is as follows:
``
__BOOST_TEST_CHECKPOINT__(checkoint_message);
``
The message formatted at the checkpoint position is saved and reported by the exception logging functions (if any
occurs). Similarly to the __BOOST_TEST_MESSAGE__ the message can be formatted from any standard
output stream compliant components.
[bt_example example22..__BOOST_TEST_CHECKPOINT__ usage]
[/ -------------------------------------------------------------------------------------------------- ]
[h3 Unnamed checkpoints]
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.
[bt_example example23..__BOOST_TEST_PASSPOINT__ usage]
[endsect] [/checkpoints]