📄 _helper_macros_8h-source.html
字号:
00183 <a name="l00237"></a><a class="code" href="group___writing_test_fixture.html#ga3">00237</a> <span class="preprocessor">#define CPPUNIT_TEST_SUITE_END_ABSTRACT() \</span>00238 <span class="preprocessor"> } \</span>00239 <span class="preprocessor"> private: </span><span class="comment">/* dummy typedef so that the macro can still end with ';'*/</span> \00240 typedef int CppUnitDummyTypedefForSemiColonEnding__00241 00242 <a name="l00287"></a><a class="code" href="group___writing_test_fixture.html#ga4">00287</a> <span class="preprocessor">#define CPPUNIT_TEST_SUITE_ADD_TEST( test ) \</span>00288 <span class="preprocessor"> context.addTest( test )</span>00289 <span class="preprocessor"></span><a name="l00296"></a><a class="code" href="group___writing_test_fixture.html#ga5">00296</a> <span class="preprocessor">#define CPPUNIT_TEST( testMethod ) \</span>00297 <span class="preprocessor"> CPPUNIT_TEST_SUITE_ADD_TEST( \</span>00298 <span class="preprocessor"> ( new CPPUNIT_NS::TestCaller<TestFixtureType>( \</span>00299 <span class="preprocessor"> context.getTestNameFor( #testMethod), \</span>00300 <span class="preprocessor"> &TestFixtureType::testMethod, \</span>00301 <span class="preprocessor"> context.makeFixture() ) ) )</span>00302 <span class="preprocessor"></span><a name="l00327"></a><a class="code" href="group___writing_test_fixture.html#ga6">00327</a> <span class="preprocessor">#define CPPUNIT_TEST_EXCEPTION( testMethod, ExceptionType ) \</span>00328 <span class="preprocessor"> CPPUNIT_TEST_SUITE_ADD_TEST( \</span>00329 <span class="preprocessor"> (new CPPUNIT_NS::ExceptionTestCaseDecorator< ExceptionType >( \</span>00330 <span class="preprocessor"> new CPPUNIT_NS::TestCaller< TestFixtureType >( \</span>00331 <span class="preprocessor"> context.getTestNameFor( #testMethod ), \</span>00332 <span class="preprocessor"> &TestFixtureType::testMethod, \</span>00333 <span class="preprocessor"> context.makeFixture() ) ) ) )</span>00334 <span class="preprocessor"></span><a name="l00351"></a><a class="code" href="group___writing_test_fixture.html#ga7">00351</a> <span class="preprocessor">#define CPPUNIT_TEST_FAIL( testMethod ) \</span>00352 <span class="preprocessor"> CPPUNIT_TEST_EXCEPTION( testMethod, CPPUNIT_NS::Exception )</span>00353 <span class="preprocessor"></span><a name="l00402"></a><a class="code" href="group___writing_test_fixture.html#ga8">00402</a> <span class="preprocessor">#define CPPUNIT_TEST_SUITE_ADD_CUSTOM_TESTS( testAdderMethod ) \</span>00403 <span class="preprocessor"> testAdderMethod( context )</span>00404 <span class="preprocessor"></span><a name="l00412"></a><a class="code" href="group___writing_test_fixture.html#ga9">00412</a> <span class="preprocessor">#define CPPUNIT_TEST_SUITE_PROPERTY( APropertyKey, APropertyValue ) \</span>00413 <span class="preprocessor"> context.addProperty( std::string(APropertyKey), \</span>00414 <span class="preprocessor"> std::string(APropertyValue) )</span>00415 <span class="preprocessor"></span><a name="l00437"></a><a class="code" href="group___creating_test_suite.html#ga0">00437</a> <span class="preprocessor">#define CPPUNIT_TEST_SUITE_REGISTRATION( ATestFixtureType ) \</span>00438 <span class="preprocessor"> static CPPUNIT_NS::AutoRegisterSuite< ATestFixtureType > \</span>00439 <span class="preprocessor"> CPPUNIT_MAKE_UNIQUE_NAME(autoRegisterRegistry__ )</span>00440 <span class="preprocessor"></span>00441 <a name="l00479"></a><a class="code" href="group___creating_test_suite.html#ga1">00479</a> <span class="preprocessor">#define CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( ATestFixtureType, suiteName ) \</span>00480 <span class="preprocessor"> static CPPUNIT_NS::AutoRegisterSuite< ATestFixtureType > \</span>00481 <span class="preprocessor"> CPPUNIT_MAKE_UNIQUE_NAME(autoRegisterRegistry__ )(suiteName)</span>00482 <span class="preprocessor"></span><a name="l00510"></a><a class="code" href="group___creating_test_suite.html#ga2">00510</a> <span class="preprocessor">#define CPPUNIT_REGISTRY_ADD( which, to ) \</span>00511 <span class="preprocessor"> static CPPUNIT_NS::AutoRegisterRegistry \</span>00512 <span class="preprocessor"> CPPUNIT_MAKE_UNIQUE_NAME( autoRegisterRegistry__ )( which, to )</span>00513 <span class="preprocessor"></span><a name="l00523"></a><a class="code" href="group___creating_test_suite.html#ga3">00523</a> <span class="preprocessor">#define CPPUNIT_REGISTRY_ADD_TO_DEFAULT( which ) \</span>00524 <span class="preprocessor"> static CPPUNIT_NS::AutoRegisterRegistry \</span>00525 <span class="preprocessor"> CPPUNIT_MAKE_UNIQUE_NAME( autoRegisterRegistry__ )( which )</span>00526 <span class="preprocessor"></span>00527 <span class="comment">// Backwards compatibility</span>00528 <span class="comment">// (Not tested!)</span>00529 00530 <span class="preprocessor">#if CPPUNIT_ENABLE_CU_TEST_MACROS</span>00531 <span class="preprocessor"></span>00532 <span class="preprocessor">#define CU_TEST_SUITE(tc) CPPUNIT_TEST_SUITE(tc)</span>00533 <span class="preprocessor"></span><span class="preprocessor">#define CU_TEST_SUB_SUITE(tc,sc) CPPUNIT_TEST_SUB_SUITE(tc,sc)</span>00534 <span class="preprocessor"></span><span class="preprocessor">#define CU_TEST(tm) CPPUNIT_TEST(tm)</span>00535 <span class="preprocessor"></span><span class="preprocessor">#define CU_TEST_SUITE_END() CPPUNIT_TEST_SUITE_END()</span>00536 <span class="preprocessor"></span><span class="preprocessor">#define CU_TEST_SUITE_REGISTRATION(tc) CPPUNIT_TEST_SUITE_REGISTRATION(tc)</span>00537 <span class="preprocessor"></span>00538 <span class="preprocessor">#endif</span>00539 <span class="preprocessor"></span>00540 00541 <span class="preprocessor">#endif // CPPUNIT_EXTENSIONS_HELPERMACROS_H</span></div></pre><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 + -