?? struct_asserter.html
字號:
<tr> <td class="md" nowrap valign="top"> void Asserter::failNotEqual </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">std::string </td> <td class="mdname" nowrap> <em>expected</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>std::string </td> <td class="mdname" nowrap> <em>actual</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>const <a class="el" href="class_source_line.html">SourceLine</a> & </td> <td class="mdname" nowrap> <em>sourceLine</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>const <a class="el" href="class_additional_message.html">AdditionalMessage</a> & </td> <td class="mdname" nowrap> <em>additionalMessage</em> = <code><a class="el" href="class_additional_message.html">AdditionalMessage</a>()</code>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>std::string </td> <td class="mdname" nowrap> <em>shortDescription</em> = <code>"equality assertion failed"</code></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Throws an <a class="el" href="class_exception.html">Exception</a> with the specified message and location. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>expected</em> </td><td>Text describing the expected value. </td></tr> <tr><td></td><td valign=top><em>actual</em> </td><td>Text describing the actual value. </td></tr> <tr><td></td><td valign=top><em>sourceLine</em> </td><td>Location of the assertion. </td></tr> <tr><td></td><td valign=top><em>additionalMessage</em> </td><td>Additional message. Usually used to report what are the differences between the expected and actual value. </td></tr> <tr><td></td><td valign=top><em>shortDescription</em> </td><td>Short description for the failure message. </td></tr> </table></dl> </td> </tr></table><a class="anchor" name="e8" doxytag="Asserter::failNotEqualIf" ></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 Asserter::failNotEqualIf </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">bool </td> <td class="mdname" nowrap> <em>shouldFail</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>std::string </td> <td class="mdname" nowrap> <em>expected</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>std::string </td> <td class="mdname" nowrap> <em>actual</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>const <a class="el" href="class_source_line.html">SourceLine</a> & </td> <td class="mdname" nowrap> <em>sourceLine</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>const <a class="el" href="class_additional_message.html">AdditionalMessage</a> & </td> <td class="mdname" nowrap> <em>additionalMessage</em> = <code><a class="el" href="class_additional_message.html">AdditionalMessage</a>()</code>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>std::string </td> <td class="mdname" nowrap> <em>shortDescription</em> = <code>"equality assertion failed"</code></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Throws an <a class="el" href="class_exception.html">Exception</a> with the specified message and location. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>shouldFail</em> </td><td>if <code>true</code> then the exception is thrown. Otherwise nothing happen. </td></tr> <tr><td></td><td valign=top><em>expected</em> </td><td>Text describing the expected value. </td></tr> <tr><td></td><td valign=top><em>actual</em> </td><td>Text describing the actual value. </td></tr> <tr><td></td><td valign=top><em>sourceLine</em> </td><td>Location of the assertion. </td></tr> <tr><td></td><td valign=top><em>additionalMessage</em> </td><td>Additional message. Usually used to report where the "difference" is located. </td></tr> <tr><td></td><td valign=top><em>shortDescription</em> </td><td>Short description for the failure message. </td></tr> </table></dl> </td> </tr></table><a class="anchor" name="e5" doxytag="Asserter::makeActual" ></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"> std::string Asserter::makeActual </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const std::string & </td> <td class="mdname1" valign="top" nowrap> <em>actualValue</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Returns an actual value string for a message. Typically used to create 'not equal' message, or to check that a message contains the expected content when writing unit tests for your custom assertions. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>actualValue</em> </td><td>String that represents the actual value. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd><em>actualValue</em> prefixed with "Actual : ". </dd></dl><dl compact><dt><b>See also:</b></dt><dd>makeExpected(). </dd></dl> </td> </tr></table><a class="anchor" name="e4" doxytag="Asserter::makeExpected" ></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"> std::string Asserter::makeExpected </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const std::string & </td> <td class="mdname1" valign="top" nowrap> <em>expectedValue</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Returns a expected value string for a message. Typically used to create 'not equal' message, or to check that a message contains the expected content when writing unit tests for your custom assertions. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>expectedValue</em> </td><td>String that represents the expected value. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd><em>expectedValue</em> prefixed with "Expected: ". </dd></dl><dl compact><dt><b>See also:</b></dt><dd>makeActual(). </dd></dl> </td> </tr></table><a class="anchor" name="e6" doxytag="Asserter::makeNotEqualMessage" ></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_message.html">Message</a> Asserter::makeNotEqualMessage </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const std::string & </td> <td class="mdname" nowrap> <em>expectedValue</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>actualValue</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>const <a class="el" href="class_additional_message.html">AdditionalMessage</a> & </td> <td class="mdname" nowrap> <em>additionalMessage</em> = <code><a class="el" href="class_additional_message.html">AdditionalMessage</a>()</code>, </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>"equality assertion failed"</code></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><hr>The documentation for this struct was generated from the following files:<ul><li><a class="el" href="_asserter_8h-source.html">Asserter.h</a><li><a class="el" href="_asserter_8cpp.html">Asserter.cpp</a></ul><hr><table width="100%"> <tr> <td width="10%" align="left" valign="center"> <a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=11795" width="88" height="31" border="0" alt="SourceForge Logo"></a> </td> <td width="20%" align="left" valign="center"> hosts this site. </td> <td> </td> <td align="right" valign="center"> Send comments to:<br> <a href="mailto:cppunit-devel@lists.sourceforge.net">CppUnit Developers</a> </td> </tr></table></body> </html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -