mirror of
https://github.com/boostorg/test.git
synced 2026-01-25 06:42:22 +00:00
some new links for log level parameters and section
fixed an issue with TOC and BOOST_PASSPOINT etc some typos
This commit is contained in:
@@ -330,7 +330,7 @@ format use the [link ref_log_formatter_api custom log formatting API].
|
||||
[/ ###############################################################################################]
|
||||
[#ref_param_log_level][section `log_level`]
|
||||
|
||||
Allows setting the __UTF__ <link linkid="utf.user-guide.test-output.log">log level</link> in a range from a
|
||||
Allows setting the __UTF__ [link ref_log_level_explanations log level] in a range from a
|
||||
complete log, when all successful tests are confirmed and all test suite messages are included, to an empty
|
||||
log when nothing is logged a test output stream.
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ at runtime during a test module invocation and at compile time from within a tes
|
||||
public interfaces. For example, for automated test module output processing it might be more convenient to use
|
||||
the XML based format.
|
||||
|
||||
In most cases The __UTF__ can't provide an exact location, where system error occurs or uncaught C++ exception
|
||||
In most cases, the __UTF__ can't provide an exact location, where system error occurs or uncaught C++ exception
|
||||
is thrown from. To be able to pinpoint it as close as possible the __UTF__ keeps track of checkpoints - the
|
||||
location a test module passed through. A test case entrance and exit points, a test tool invocation point the
|
||||
__UTF__ tracks automatically. Any other checkpoints should be entered by you manually. The test log provides two
|
||||
@@ -129,8 +129,10 @@ interface you will get a compilation error. You can either implement above inter
|
||||
specified type. To do so use following statement on file level before first test case that includes statement
|
||||
failing to compile:
|
||||
|
||||
``
|
||||
BOOST_TEST_DONT_PRINT_LOG_VALUE(ArgumentType)
|
||||
|
||||
``
|
||||
|
||||
[import examples/example32.cpp]
|
||||
[import examples/example32.output]
|
||||
[table:id_example32 BOOST_TEST_DONT_PRINT_LOG_VALUE usage
|
||||
@@ -159,7 +161,7 @@ parameter __param_output_format__.
|
||||
|
||||
[/ -------------------------------------------------------------------------------------------------- ]
|
||||
|
||||
[#ref_macro_boost_test_message][section:log_test_messages __BOOST_TEST_MESSAGE__]
|
||||
[#ref_macro_boost_test_message][section `BOOST_TEST_MESSAGE`]
|
||||
The macro __BOOST_TEST_MESSAGE__ is intended to be used for the purpose of injecting an additional message into the
|
||||
__UTF__ test log. These messages are not intended to indicate any error or warning conditions, but rather as
|
||||
information/status notifications. The macro signature is as follows:
|
||||
@@ -167,7 +169,7 @@ information/status notifications. The macro signature is as follows:
|
||||
__BOOST_TEST_MESSAGE__(test_message);
|
||||
|
||||
The test_message argument can be as simple as C string literal or any custom expression that you can produce
|
||||
with in a manner similar to standard `iostream` operation.
|
||||
with in a manner similar to standard `std::iostream` operation.
|
||||
|
||||
[important Messages generated by this tool do not appear in test log output with default value of the active log level
|
||||
threshold. For these messages to appear the active log level threshold has to be set to a value below or equal
|
||||
@@ -193,13 +195,15 @@ with in a manner similar to standard `iostream` operation.
|
||||
|
||||
|
||||
[/ -------------------------------------------------------------------------------------------------- ]
|
||||
[#ref_BOOST_TEST_CHECKPOINT][section __BOOST_TEST_CHECKPOINT__]
|
||||
[#ref_BOOST_TEST_CHECKPOINT][section `BOOST_TEST_CHECKPOINT`]
|
||||
|
||||
|
||||
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
|
||||
@@ -226,7 +230,7 @@ output stream compliant components.
|
||||
|
||||
|
||||
[/ -------------------------------------------------------------------------------------------------- ]
|
||||
[#ref_BOOST_TEST_PASSPOINT][section __BOOST_TEST_PASSPOINT__]
|
||||
[#ref_BOOST_TEST_PASSPOINT][section `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:
|
||||
@@ -409,10 +413,12 @@ accessible through local file scope reference to single instance of this class
|
||||
|
||||
[section:log_ct_output_stream_redirection Log output stream redirection]
|
||||
|
||||
If you want to redirect the test log output stream into something different from std::cout use the following
|
||||
If you want to redirect the test log output stream into something different from `std::cout` use the following
|
||||
interface:
|
||||
|
||||
``
|
||||
boost::unit_test::unit_test_log.set_stream( std::ostream& str );
|
||||
``
|
||||
|
||||
You can reset the output stream at any time both during the test module initialization and from within test
|
||||
cases. There are no limitations on number of output stream resets either.
|
||||
@@ -440,14 +446,15 @@ cases. There are no limitations on number of output stream resets either.
|
||||
|
||||
|
||||
|
||||
[section:log_ct_log_level Log level configuration]
|
||||
[#ref_log_level_explanations][section:log_ct_log_level Log level configuration]
|
||||
If you need to enforce specific log level from within your test module use the following interface:
|
||||
|
||||
``
|
||||
boost::unit_test::unit_test_log.set_threshold_level( boost::unit_test::log_level );
|
||||
|
||||
``
|
||||
|
||||
In regular circumstances you shouldn't use this interface, since you not only override default log level, but also
|
||||
the one supplied at test execution time. Prefer to use runtime parameters for log level selection.
|
||||
the one supplied at test execution time. Prefer to use runtime parameters __param_log_level__ for log level selection.
|
||||
|
||||
|
||||
[import examples/example51.cpp]
|
||||
@@ -469,7 +476,9 @@ the one supplied at test execution time. Prefer to use runtime parameters for lo
|
||||
[section:log_ct_log_format Predefined log format selection]
|
||||
The select at compile time the log format from the list of the formats supplied by the __UTF__
|
||||
|
||||
``
|
||||
boost::unit_test::unit_test_log.set_format( boost::unit_test::output_format );
|
||||
``
|
||||
|
||||
In regular circumstances you shouldn't use this interface. Prefer to use runtime parameters for predefined log
|
||||
format selection.
|
||||
|
||||
Reference in New Issue
Block a user