• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Class progress_monitor_t</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="../../header/boost/test/progress_monitor_hpp.html" title="Header &lt;boost/test/progress_monitor.hpp&gt;">
9<link rel="prev" href="../../header/boost/test/progress_monitor_hpp.html" title="Header &lt;boost/test/progress_monitor.hpp&gt;">
10<link rel="next" href="../../header/boost/test/results_collector_hpp.html" title="Header &lt;boost/test/results_collector.hpp&gt;">
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="../../header/boost/test/progress_monitor_hpp.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../header/boost/test/progress_monitor_hpp.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="../../header/boost/test/results_collector_hpp.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="refentry">
26<a name="boost.unit_test.progress_monitor_t"></a><div class="titlepage"></div>
27<div class="refnamediv">
28<h2><span class="refentrytitle">Class progress_monitor_t</span></h2>
29<p>boost::unit_test::progress_monitor_t — This class implements test observer interface and updates test progress as test units finish or get aborted. </p>
30</div>
31<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
32<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../header/boost/test/progress_monitor_hpp.html" title="Header &lt;boost/test/progress_monitor.hpp&gt;">boost/test/progress_monitor.hpp</a>&gt;
33
34</span>
35<span class="keyword">class</span> <a class="link" href="progress_monitor_t.html" title="Class progress_monitor_t">progress_monitor_t</a> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unit_test</span><span class="special">::</span><span class="identifier">test_observer</span> <span class="special">{</span>
36<span class="keyword">public</span><span class="special">:</span>
37
38  <span class="comment">// <a class="link" href="progress_monitor_t.html#idm45267287257904-bb">public member functions</a></span>
39  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="progress_monitor_t.html#idm45267287257344-bb"><span class="identifier">test_finish</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
40  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="progress_monitor_t.html#idm45267287254864-bb"><span class="identifier">test_unit_start</span></a><span class="special">(</span><a class="link" href="test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
41  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="progress_monitor_t.html#idm45267287252016-bb"><span class="identifier">test_unit_skipped</span></a><span class="special">(</span><a class="link" href="test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
42  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="progress_monitor_t.html#idm45267287249632-bb"><span class="identifier">test_unit_timed_out</span></a><span class="special">(</span><a class="link" href="test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
43  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="progress_monitor_t.html#idm45267287246672-bb"><span class="identifier">test_unit_aborted</span></a><span class="special">(</span><a class="link" href="test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
44  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="progress_monitor_t.html#idm45267287241664-bb"><span class="identifier">assertion_result</span></a><span class="special">(</span><span class="identifier">unit_test</span><span class="special">::</span><span class="identifier">assertion_result</span><span class="special">)</span><span class="special">;</span>
45  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="progress_monitor_t.html#idm45267287239840-bb"><span class="identifier">exception_caught</span></a><span class="special">(</span><a class="link" href="../execution_exception.html" title="Class execution_exception">execution_exception</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
46<span class="special">}</span><span class="special">;</span></pre></div>
47<div class="refsect1">
48<a name="idm46175617451824"></a><h2>Description</h2>
49<div class="refsect2">
50<a name="idm46175617451408"></a><h3>
51<a name="idm45267287257904-bb"></a><code class="computeroutput">progress_monitor_t</code> public member functions</h3>
52<div class="orderedlist"><ol class="orderedlist" type="1">
53<li class="listitem">
54<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287257344-bb"></a><span class="identifier">test_finish</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Called after the framework ends executing the test cases. <div class="note"><table border="0" summary="Note">
55<tr>
56<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
57<th align="left">Note</th>
58</tr>
59<tr><td align="left" valign="top"><p>The call is made with a reversed priority order. </p></td></tr>
60</table></div>
61<p>
62</p>
63</li>
64<li class="listitem">
65<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287254864-bb"></a><span class="identifier">test_unit_start</span><span class="special">(</span><a class="link" href="test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>Called before the framework starts executing a test unit. <p>
66</p>
67</li>
68<li class="listitem">
69<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287252016-bb"></a><span class="identifier">test_unit_skipped</span><span class="special">(</span><a class="link" href="test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>backward compatibility </li>
70<li class="listitem">
71<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287249632-bb"></a><span class="identifier">test_unit_timed_out</span><span class="special">(</span><a class="link" href="test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>Called when the test timed out. <p>This function is called to signal that a test unit (case or suite) timed out. A valid test unit is available through boost::unit_test::framework::current_test_unit </p>
72</li>
73<li class="listitem">
74<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287246672-bb"></a><span class="identifier">test_unit_aborted</span><span class="special">(</span><a class="link" href="test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>Called when a test unit indicates a fatal error. <p>A fatal error happens when</p>
75<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
76<li class="listitem"><p>a strong assertion (with <code class="computeroutput">REQUIRE</code>) fails, which indicates that the test case cannot continue</p></li>
77<li class="listitem"><p>an unexpected exception is caught by the Boost.Test framework </p></li>
78</ul></div>
79<p>
80</p>
81</li>
82<li class="listitem"><pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287241664-bb"></a><span class="identifier">assertion_result</span><span class="special">(</span><span class="identifier">unit_test</span><span class="special">::</span><span class="identifier">assertion_result</span><span class="special">)</span><span class="special">;</span></pre></li>
83<li class="listitem">
84<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287239840-bb"></a><span class="identifier">exception_caught</span><span class="special">(</span><a class="link" href="../execution_exception.html" title="Class execution_exception">execution_exception</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>Called when an exception is intercepted. <p>In case an exception is intercepted, this call happens before the call to test_unit_aborted in order to log additional data about the exception. </p>
85</li>
86</ol></div>
87</div>
88</div>
89</div>
90<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
91<td align="left"></td>
92<td align="right"><div class="copyright-footer">Copyright © 2001-2020 Boost.Test contributors<p>
93        Distributed under the Boost Software License, Version 1.0. (See accompanying
94        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>)
95      </p>
96</div></td>
97</tr></table>
98<hr>
99<div class="spirit-nav">
100<a accesskey="p" href="../../header/boost/test/progress_monitor_hpp.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../header/boost/test/progress_monitor_hpp.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="../../header/boost/test/results_collector_hpp.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
101</div>
102</body>
103</html>
104