📄 class_test_result.html
字号:
<tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void TestResult::addFailure </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="class_test.html">Test</a> * </td> <td class="mdname" nowrap> <em>test</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap><a class="el" href="class_exception.html">Exception</a> * </td> <td class="mdname" nowrap> <em>e</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Adds a failure to the list of failures. The passed in exception caused the failure. <p> </td> </tr></table><a class="anchor" name="a2" doxytag="TestResult::addListener" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void TestResult::addListener </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="class_test_listener.html">TestListener</a> * </td> <td class="mdname1" valign="top" nowrap> <em>listener</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><a class="anchor" name="a12" doxytag="TestResult::endSuite" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void TestResult::endSuite </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="class_test.html">Test</a> * </td> <td class="mdname1" valign="top" nowrap> <em>test</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Informs <a class="el" href="class_test_listener.html">TestListener</a> that a test suite was completed. <p> </td> </tr></table><a class="anchor" name="a10" doxytag="TestResult::endTest" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void TestResult::endTest </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="class_test.html">Test</a> * </td> <td class="mdname1" valign="top" nowrap> <em>test</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Informs <a class="el" href="class_test_listener.html">TestListener</a> that a test was completed. <p> </td> </tr></table><a class="anchor" name="b2" doxytag="TestResult::endTestRun" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void TestResult::endTestRun </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="class_test.html">Test</a> * </td> <td class="mdname1" valign="top" nowrap> <em>test</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [protected, virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><a class="anchor" name="d1" doxytag="TestResult::operator=" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="class_test_result.html">TestResult</a>& TestResult::operator= </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="class_test_result.html">TestResult</a> & </td> <td class="mdname1" valign="top" nowrap> <em>other</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [private]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><a class="anchor" name="a16" doxytag="TestResult::popProtector" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void TestResult::popProtector </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Removes the last protector from the protector chain. <p> </td> </tr></table><a class="anchor" name="a14" doxytag="TestResult::protect" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> bool TestResult::protect </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="class_functor.html">Functor</a> & </td> <td class="mdname" nowrap> <em>functor</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap><a class="el" href="class_test.html">Test</a> * </td> <td class="mdname" nowrap> <em>test</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>const std::string & </td> <td class="mdname" nowrap> <em>shortDescription</em> = <code>std::string("")</code></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Protects a call to the specified functor. <p>See <a class="el" href="class_protector.html">Protector</a> to understand how protector works. A default protector is always present. It captures CppUnit::Exception, std::exception and any other exceptions, retrieving as much as possible information about the exception as possible.<p>Additional <a class="el" href="class_protector.html">Protector</a> can be added to the chain to support other exception types using pushProtector() and <a class="el" href="class_test_result.html#a16">popProtector()</a>.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>functor</em> </td><td><a class="el" href="class_functor.html">Functor</a> to call (typically a call to setUp(), runTest() or tearDown(). </td></tr> <tr><td></td><td valign=top><em>test</em> </td><td><a class="el" href="class_test.html">Test</a> the functor is associated to (used for failure reporting). </td></tr> <tr><td></td><td valign=top><em>shortDescription</em> </td><td>Short description override for the failure message. </td></tr> </table></dl> </td> </tr></table><a class="anchor" name="a15" doxytag="TestResult::pushProtector" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void TestResult::pushProtector </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="class_protector.html">Protector</a> * </td> <td class="mdname1" valign="top" nowrap> <em>protector</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Adds the specified protector to the protector chain. <p> </td> </tr></table><a class="anchor" name="a3" doxytag="TestResult::removeListener" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void TestResult::removeListener </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="class_test_listener.html">TestListener</a> * </td> <td class="mdname1" valign="top" nowrap> <em>listener</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -