• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>save_pattern</title>
5<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../../index.html" title="Boost.Test">
8<link rel="up" href="../rt_param_reference.html" title="Runtime parameters reference">
9<link rel="prev" href="run_test.html" title="run_test">
10<link rel="next" href="show_progress.html" title="show_progress">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="run_test.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../rt_param_reference.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="show_progress.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h4 class="title">
27<a name="boost_test.utf_reference.rt_param_reference.save_pattern"></a><a class="link" href="save_pattern.html" title="save_pattern"><code class="computeroutput"><span class="identifier">save_pattern</span></code></a>
28</h4></div></div></div>
29<p>
30          Option <span class="emphasis"><em>save_pattern</em></span> facilitates switching mode of
31          operation for testing output streams. See <a class="link" href="../../testing_tools/output_stream_testing.html" title="Output streams testing tool">output
32          test stream</a> section for details on these tests.
33        </p>
34<p>
35          This parameter serves no particular purpose within the framework itself.
36          It can be used by test modules relying on <code class="computeroutput"><a class="link" href="../../../boost/test_tools/output_test_stream.html" title="Class output_test_stream">boost::test_tools::output_test_stream</a></code>
37          to implement testing logic. It has two modes of operation:
38        </p>
39<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
40<li class="listitem">
41              save the pattern file (true).
42            </li>
43<li class="listitem">
44              and match against a previously stored pattern file (false).
45            </li>
46</ul></div>
47<p>
48          Default mode is 'match' (false).
49        </p>
50<p>
51          You can use this parameter to switch between these modes, by passing the
52          parameter value to the <code class="computeroutput"><span class="identifier">output_test_stream</span></code>
53          constructor. The value of the command line parameter is available using
54          call like this:
55        </p>
56<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">is_save_pattern_flag_set</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unit_test</span><span class="special">::</span><span class="identifier">runtime_config</span><span class="special">::</span><span class="identifier">save_pattern</span><span class="special">();</span>
57</pre>
58<h5>
59<a name="boost_test.utf_reference.rt_param_reference.save_pattern.h0"></a>
60          <span class="phrase"><a name="boost_test.utf_reference.rt_param_reference.save_pattern.acceptable_values"></a></span><a class="link" href="save_pattern.html#boost_test.utf_reference.rt_param_reference.save_pattern.acceptable_values">Acceptable
61          values</a>
62        </h5>
63<p>
64          <a class="link" href="../rt_param_reference.html#boolean_param_value">Boolean</a> with default value
65          <span class="bold"><strong>no</strong></span>.
66        </p>
67<h5>
68<a name="boost_test.utf_reference.rt_param_reference.save_pattern.h1"></a>
69          <span class="phrase"><a name="boost_test.utf_reference.rt_param_reference.save_pattern.command_line_syntax"></a></span><a class="link" href="save_pattern.html#boost_test.utf_reference.rt_param_reference.save_pattern.command_line_syntax">Command
70          line syntax</a>
71        </h5>
72<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
73              <code class="computeroutput"><span class="special">--</span><span class="identifier">save_pattern</span><span class="special">[=&lt;</span><span class="identifier">boolean</span>
74              <span class="identifier">value</span><span class="special">&gt;]</span></code>
75            </li></ul></div>
76<h5>
77<a name="boost_test.utf_reference.rt_param_reference.save_pattern.h2"></a>
78          <span class="phrase"><a name="boost_test.utf_reference.rt_param_reference.save_pattern.environment_variable"></a></span><a class="link" href="save_pattern.html#boost_test.utf_reference.rt_param_reference.save_pattern.environment_variable">Environment
79          variable</a>
80        </h5>
81<pre class="programlisting"><span class="identifier">BOOST_TEST_SAVE_PATTERN</span>
82</pre>
83</div>
84<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
85<td align="left"></td>
86<td align="right"><div class="copyright-footer">Copyright © 2001-2020 Boost.Test contributors<p>
87        Distributed under the Boost Software License, Version 1.0. (See accompanying
88        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
89      </p>
90</div></td>
91</tr></table>
92<hr>
93<div class="spirit-nav">
94<a accesskey="p" href="run_test.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../rt_param_reference.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="show_progress.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
95</div>
96</body>
97</html>
98