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

📄 _test_suite_builder_context_8h-source.html

📁 c++开发的一个不错的工具
💻 HTML
字号:
<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>TestSuiteBuilderContext.h</h1><a href="_test_suite_builder_context_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="preprocessor">#ifndef CPPUNIT_HELPER_TESTSUITEBUILDERCONTEXT_H</span>00002 <span class="preprocessor"></span><span class="preprocessor">#define CPPUNIT_HELPER_TESTSUITEBUILDERCONTEXT_H</span>00003 <span class="preprocessor"></span>00004 <span class="preprocessor">#include &lt;<a class="code" href="_portability_8h.html">cppunit/Portability.h</a>&gt;</span>00005 <span class="preprocessor">#include &lt;<a class="code" href="_cpp_unit_map_8h.html">cppunit/portability/CppUnitMap.h</a>&gt;</span>00006 <span class="preprocessor">#include &lt;string&gt;</span>00007 00008 <span class="preprocessor">#if CPPUNIT_NEED_DLL_DECL</span>00009 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( push )</span>00010 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( disable: 4251 )  // X needs to have dll-interface to be used by clients of class Z</span>00011 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00012 <span class="preprocessor"></span>00013 00014 <a class="code" href="_portability_8h.html#a6">CPPUNIT_NS_BEGIN</a>00015 00016 <span class="keyword">class </span><a class="code" href="class_test_suite.html">TestSuite</a>;00017 <span class="keyword">class </span><a class="code" href="class_test_fixture.html">TestFixture</a>;00018 <span class="keyword">class </span><a class="code" href="class_test_fixture_factory.html">TestFixtureFactory</a>;00019 <span class="keyword">class </span><a class="code" href="class_test_namer.html">TestNamer</a>;00020 <a name="l00029"></a><a class="code" href="class_test_suite_builder_context_base.html">00029</a> <span class="keyword">class </span>CPPUNIT_API TestSuiteBuilderContextBase00030 {00031 <span class="keyword">public</span>:00037   TestSuiteBuilderContextBase( <a class="code" href="class_test_suite.html">TestSuite</a> &amp;suite,00038                                <span class="keyword">const</span> <a class="code" href="class_test_namer.html">TestNamer</a> &amp;namer,00039                                <a class="code" href="class_test_fixture_factory.html">TestFixtureFactory</a> &amp;factory );00040 00041   <span class="keyword">virtual</span> ~TestSuiteBuilderContextBase();00042 00047   <span class="keywordtype">void</span> addTest( <a class="code" href="class_test.html">Test</a> *test );00048 00053   std::string getFixtureName() <span class="keyword">const</span>;00054 00063   std::string getTestNameFor( <span class="keyword">const</span> std::string &amp;testMethodName ) <span class="keyword">const</span>;00064 00069   <span class="keywordtype">void</span> addProperty( <span class="keyword">const</span> std::string &amp;key, 00070                     <span class="keyword">const</span> std::string &amp;value );00071   00075   <span class="keyword">const</span> std::string getStringProperty( <span class="keyword">const</span> std::string &amp;key ) <span class="keyword">const</span>;00076 00077 <span class="keyword">protected</span>:00078   <a class="code" href="class_test_fixture.html">TestFixture</a> *makeTestFixture() <span class="keyword">const</span>;00079 00080   <span class="comment">// Notes: we use a vector here instead of a map to work-around the</span>00081   <span class="comment">// shared std::map in dll bug in VC6.</span>00082   <span class="comment">// See http://www.dinkumware.com/vc_fixes.html for detail.</span><a name="l00083"></a><a class="code" href="class_test_suite_builder_context_base.html#x0">00083</a>   <span class="keyword">typedef</span> std::pair&lt;std::string,std::string&gt; <a class="code" href="class_test_suite_builder_context_base.html#x0">Property</a>;<a name="l00084"></a><a class="code" href="class_test_suite_builder_context_base.html#x1">00084</a>   <span class="keyword">typedef</span> CppUnitVector&lt;Property&gt; Properties;00085 <a name="l00086"></a><a class="code" href="class_test_suite_builder_context_base.html#p0">00086</a>   <a class="code" href="class_test_suite.html">TestSuite</a> &amp;m_suite;<a name="l00087"></a><a class="code" href="class_test_suite_builder_context_base.html#p1">00087</a>   <span class="keyword">const</span> <a class="code" href="class_test_namer.html">TestNamer</a> &amp;m_namer;<a name="l00088"></a><a class="code" href="class_test_suite_builder_context_base.html#p2">00088</a>   <a class="code" href="class_test_fixture_factory.html">TestFixtureFactory</a> &amp;m_factory;00089 00090 <span class="keyword">private</span>:<a name="l00091"></a><a class="code" href="class_test_suite_builder_context_base.html#r0">00091</a>   Properties m_properties;00092 };00093 00094 00099 <span class="keyword">template</span>&lt;<span class="keyword">class</span> Fixture&gt;<a name="l00100"></a><a class="code" href="class_test_suite_builder_context.html">00100</a> <span class="keyword">class </span><a class="code" href="class_test_suite_builder_context.html">TestSuiteBuilderContext</a> : <span class="keyword">public</span> TestSuiteBuilderContextBase00101 {00102 <span class="keyword">public</span>:<a name="l00103"></a><a class="code" href="class_test_suite_builder_context.html#w0">00103</a>   <span class="keyword">typedef</span> Fixture <a class="code" href="class_test_suite_builder_context.html#w0">FixtureType</a>;00104 <a name="l00105"></a><a class="code" href="class_test_suite_builder_context.html#a0">00105</a>   <a class="code" href="class_test_suite_builder_context.html">TestSuiteBuilderContext</a>( TestSuiteBuilderContextBase &amp;contextBase )00106       : TestSuiteBuilderContextBase( contextBase )00107   {00108   }00109 <a name="l00116"></a><a class="code" href="class_test_suite_builder_context.html#a1">00116</a>   <a class="code" href="class_test_suite_builder_context.html#w0">FixtureType</a> *<a class="code" href="class_test_suite_builder_context.html#a1">makeFixture</a>()<span class="keyword"> const</span>00117 <span class="keyword">  </span>{00118     <span class="keywordflow">return</span> <a class="code" href="_portability_8h.html#a5">CPPUNIT_STATIC_CAST</a>( <a class="code" href="class_test_suite_builder_context.html#w0">FixtureType</a> *, 00119                                 TestSuiteBuilderContextBase::makeTestFixture() );00120   }00121 };00122 00123 00124 <a class="code" href="_portability_8h.html#a7">CPPUNIT_NS_END</a>00125 00126 <span class="preprocessor">#if CPPUNIT_NEED_DLL_DECL</span>00127 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( pop )</span>00128 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00129 <span class="preprocessor"></span>00130 <span class="preprocessor">#endif // CPPUNIT_HELPER_TESTSUITEBUILDERCONTEXT_H</span>00131 <span class="preprocessor"></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 + -