progress_monitor_t.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  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 &#8212; 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. </span>
  34. <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>
  35. <span class="keyword">public</span><span class="special">:</span>
  36. <span class="comment">// <a class="link" href="progress_monitor_t.html#idm46279113368400-bb">public member functions</a></span>
  37. <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="progress_monitor_t.html#idm46279113367840-bb"><span class="identifier">test_finish</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  38. <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="progress_monitor_t.html#idm46279113365360-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>
  39. <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="progress_monitor_t.html#idm46279113362512-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>
  40. <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="progress_monitor_t.html#idm46279113360128-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>
  41. <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="progress_monitor_t.html#idm46279113357168-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>
  42. <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="progress_monitor_t.html#idm46279113352160-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>
  43. <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="progress_monitor_t.html#idm46279113350336-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>
  44. <span class="special">}</span><span class="special">;</span></pre></div>
  45. <div class="refsect1">
  46. <a name="idm45313888056800"></a><h2>Description</h2>
  47. <div class="refsect2">
  48. <a name="idm45313888056384"></a><h3>
  49. <a name="idm46279113368400-bb"></a><code class="computeroutput">progress_monitor_t</code> public member functions</h3>
  50. <div class="orderedlist"><ol class="orderedlist" type="1">
  51. <li class="listitem">
  52. <pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm46279113367840-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">
  53. <tr>
  54. <td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
  55. <th align="left">Note</th>
  56. </tr>
  57. <tr><td align="left" valign="top"><p>The call is made with a reversed priority order. </p></td></tr>
  58. </table></div>
  59. <p>
  60. </p>
  61. </li>
  62. <li class="listitem">
  63. <pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm46279113365360-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>
  64. </p>
  65. </li>
  66. <li class="listitem">
  67. <pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm46279113362512-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>
  68. <li class="listitem">
  69. <pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm46279113360128-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>
  70. </li>
  71. <li class="listitem">
  72. <pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm46279113357168-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>
  73. <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
  74. <li class="listitem"><p>a strong assertion (with <code class="computeroutput">REQUIRE</code>) fails, which indicates that the test case cannot continue</p></li>
  75. <li class="listitem"><p>an unexpected exception is caught by the Boost.Test framework </p></li>
  76. </ul></div>
  77. <p>
  78. </p>
  79. </li>
  80. <li class="listitem"><pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm46279113352160-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>
  81. <li class="listitem">
  82. <pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm46279113350336-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>
  83. </li>
  84. </ol></div>
  85. </div>
  86. </div>
  87. </div>
  88. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  89. <td align="left"></td>
  90. <td align="right"><div class="copyright-footer">Copyright &#169; 2001-2019 Boost.Test
  91. contributors<p>
  92. Distributed under the Boost Software License, Version 1.0. (See accompanying
  93. 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>)
  94. </p>
  95. </div></td>
  96. </tr></table>
  97. <hr>
  98. <div class="spirit-nav">
  99. <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>
  100. </div>
  101. </body>
  102. </html>