Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

save_pattern
PrevUpHomeNext

Option save_pattern facilitates switching mode of operation for testing output streams. See output test stream section for details on these tests.

This parameter serves no particular purpose within the framework itself. It can be used by test modules relying on boost::test_tools::output_test_stream to implement testing logic. It has two modes of operation:

  • save the pattern file (true).
  • and match against a previously stored pattern file (false).

Default mode is 'match' (false).

You can use this parameter to switch between these modes, by passing the parameter value to the output_test_stream constructor. The value of the command line parameter is available using call like this:

bool is_save_pattern_flag_set = boost::unit_test::runtime_config::save_pattern();
Acceptable values

Boolean with default value no.

Command line syntax
  • --save_pattern[=<boolean value>]
Environment variable
BOOST_TEST_SAVE_PATTERN

PrevUpHomeNext