⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 _helper_macros_8h-source.html

📁 c++开发的一个不错的工具
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html><head><title>CppUnit - The Unit Testing Library</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body bgcolor="#ffffff"> <table width="100%">  <tr>    <td width="40%" align="left" valign="center">      <a href="http://sourceforge.net/projects/cppunit">      CppUnit project page      </a>    </td>    <td>      <a href="FAQ">FAQ</a>    </td>    <td width="40%" align="right" valign="center">      <a href="http://cppunit.sourceforge.net">CppUnit home page</a>    </td>  </tr></table><hr><!-- Generated by Doxygen 1.3.7 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div><h1>HelperMacros.h</h1><a href="_helper_macros_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="comment">// //////////////////////////////////////////////////////////////////////////</span>00002 <span class="comment">// Header file HelperMacros.h</span>00003 <span class="comment">// (c)Copyright 2000, Baptiste Lepilleur.</span>00004 <span class="comment">// Created: 2001/04/15</span>00005 <span class="comment">// //////////////////////////////////////////////////////////////////////////</span>00006 <span class="preprocessor">#ifndef CPPUNIT_EXTENSIONS_HELPERMACROS_H</span>00007 <span class="preprocessor"></span><span class="preprocessor">#define CPPUNIT_EXTENSIONS_HELPERMACROS_H</span>00008 <span class="preprocessor"></span>00009 <span class="preprocessor">#include &lt;<a class="code" href="_test_caller_8h.html">cppunit/TestCaller.h</a>&gt;</span>00010 <span class="preprocessor">#include &lt;<a class="code" href="_test_suite_8h.html">cppunit/TestSuite.h</a>&gt;</span>00011 <span class="preprocessor">#include &lt;<a class="code" href="_auto_register_suite_8h.html">cppunit/extensions/AutoRegisterSuite.h</a>&gt;</span>00012 <span class="preprocessor">#include &lt;<a class="code" href="_exception_test_case_decorator_8h.html">cppunit/extensions/ExceptionTestCaseDecorator.h</a>&gt;</span>00013 <span class="preprocessor">#include &lt;<a class="code" href="_test_fixture_factory_8h.html">cppunit/extensions/TestFixtureFactory.h</a>&gt;</span>00014 <span class="preprocessor">#include &lt;<a class="code" href="_test_namer_8h.html">cppunit/extensions/TestNamer.h</a>&gt;</span>00015 <span class="preprocessor">#include &lt;<a class="code" href="_test_suite_builder_context_8h.html">cppunit/extensions/TestSuiteBuilderContext.h</a>&gt;</span>00016 <span class="preprocessor">#include &lt;memory&gt;</span>00017 00018 <a name="l00100"></a><a class="code" href="group___writing_test_fixture.html#ga0">00100</a> <span class="preprocessor">#define CPPUNIT_TEST_SUITE( ATestFixtureType )                              \</span>00101 <span class="preprocessor">  public:                                                                   \</span>00102 <span class="preprocessor">    typedef ATestFixtureType TestFixtureType;                               \</span>00103 <span class="preprocessor">                                                                            \</span>00104 <span class="preprocessor">  private:                                                                  \</span>00105 <span class="preprocessor">    static const CPPUNIT_NS::TestNamer &amp;getTestNamer__()                    \</span>00106 <span class="preprocessor">    {                                                                       \</span>00107 <span class="preprocessor">      static CPPUNIT_TESTNAMER_DECL( testNamer, ATestFixtureType );         \</span>00108 <span class="preprocessor">      return testNamer;                                                     \</span>00109 <span class="preprocessor">    }                                                                       \</span>00110 <span class="preprocessor">                                                                            \</span>00111 <span class="preprocessor">  public:                                                                   \</span>00112 <span class="preprocessor">    typedef CPPUNIT_NS::TestSuiteBuilderContext&lt;TestFixtureType&gt;            \</span>00113 <span class="preprocessor">                TestSuiteBuilderContextType;                                \</span>00114 <span class="preprocessor">                                                                            \</span>00115 <span class="preprocessor">    static void                                                             \</span>00116 <span class="preprocessor">    addTestsToSuite( CPPUNIT_NS::TestSuiteBuilderContextBase &amp;baseContext ) \</span>00117 <span class="preprocessor">    {                                                                       \</span>00118 <span class="preprocessor">      TestSuiteBuilderContextType context( baseContext )</span>00119 <span class="preprocessor"></span>00120 <a name="l00151"></a><a class="code" href="group___writing_test_fixture.html#ga1">00151</a> <span class="preprocessor">#define CPPUNIT_TEST_SUB_SUITE( ATestFixtureType, ASuperClass )  \</span>00152 <span class="preprocessor">  public:                                                        \</span>00153 <span class="preprocessor">    typedef ASuperClass ParentTestFixtureType;                   \</span>00154 <span class="preprocessor">  private:                                                       \</span>00155 <span class="preprocessor">    CPPUNIT_TEST_SUITE( ATestFixtureType );                      \</span>00156 <span class="preprocessor">      ParentTestFixtureType::addTestsToSuite( baseContext )</span>00157 <span class="preprocessor"></span>00158 <a name="l00166"></a><a class="code" href="group___writing_test_fixture.html#ga2">00166</a> <span class="preprocessor">#define CPPUNIT_TEST_SUITE_END()                                               \</span>00167 <span class="preprocessor">    }                                                                          \</span>00168 <span class="preprocessor">                                                                               \</span>00169 <span class="preprocessor">    static CPPUNIT_NS::TestSuite *suite()                                      \</span>00170 <span class="preprocessor">    {                                                                          \</span>00171 <span class="preprocessor">      const CPPUNIT_NS::TestNamer &amp;namer = getTestNamer__();                   \</span>00172 <span class="preprocessor">      std::auto_ptr&lt;CPPUNIT_NS::TestSuite&gt; suite(                              \</span>00173 <span class="preprocessor">             new CPPUNIT_NS::TestSuite( namer.getFixtureName() ));             \</span>00174 <span class="preprocessor">      CPPUNIT_NS::ConcretTestFixtureFactory&lt;TestFixtureType&gt; factory;          \</span>00175 <span class="preprocessor">      CPPUNIT_NS::TestSuiteBuilderContextBase context( *suite.get(),           \</span>00176 <span class="preprocessor">                                                       namer,                  \</span>00177 <span class="preprocessor">                                                       factory );              \</span>00178 <span class="preprocessor">      TestFixtureType::addTestsToSuite( context );                             \</span>00179 <span class="preprocessor">      return suite.release();                                                  \</span>00180 <span class="preprocessor">    }                                                                          \</span>00181 <span class="preprocessor">  private: </span><span class="comment">/* dummy typedef so that the macro can still end with ';'*/</span>         \00182     typedef int CppUnitDummyTypedefForSemiColonEnding__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -