?? _portability_8h-source.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 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 Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div><h1>Portability.h</h1><a href="_portability_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="preprocessor">#ifndef CPPUNIT_PORTABILITY_H</span>00002 <span class="preprocessor"></span><span class="preprocessor">#define CPPUNIT_PORTABILITY_H</span>00003 <span class="preprocessor"></span>00004 <span class="preprocessor">#if defined(_WIN32) && !defined(WIN32)</span>00005 <span class="preprocessor"></span><span class="preprocessor"># define WIN32 1</span>00006 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00007 <span class="preprocessor"></span>00008 <span class="comment">/* include platform specific config */</span>00009 <span class="preprocessor">#if defined(__BORLANDC__)</span>00010 <span class="preprocessor"></span><span class="preprocessor"># include <cppunit/config/config-bcb5.h></span>00011 <span class="preprocessor">#elif defined (_MSC_VER)</span>00012 <span class="preprocessor"></span><span class="preprocessor"># include <cppunit/config/config-msvc6.h></span>00013 <span class="preprocessor">#else</span>00014 <span class="preprocessor"></span><span class="preprocessor"># include <cppunit/config-auto.h></span>00015 <span class="preprocessor">#endif</span>00016 <span class="preprocessor"></span>00017 <span class="comment">// Version number of package</span>00018 <span class="preprocessor">#ifndef CPPUNIT_VERSION </span><a name="l00019"></a><a class="code" href="_portability_8h.html#a0">00019</a> <span class="preprocessor"></span><span class="preprocessor">#define CPPUNIT_VERSION "1.10.2"</span>00020 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00021 <span class="preprocessor"></span> 00022 <span class="preprocessor">#include <<a class="code" href="_cpp_unit_api_8h.html">cppunit/config/CppUnitApi.h</a>></span> <span class="comment">// define CPPUNIT_API & CPPUNIT_NEED_DLL_DECL</span>00023 <span class="preprocessor">#include <<a class="code" href="_select_dll_loader_8h.html">cppunit/config/SelectDllLoader.h</a>></span>00024 00025 00026 <span class="comment">/* Options that the library user may switch on or off.</span>00027 <span class="comment"> * If the user has not done so, we chose default values.</span>00028 <span class="comment"> */</span>00029 00030 00031 <span class="comment">/* Define to 1 if you wish to have the old-style macros</span>00032 <span class="comment"> assert(), assertEqual(), assertDoublesEqual(), and assertLongsEqual() */</span>00033 <span class="preprocessor">#if !defined(CPPUNIT_ENABLE_NAKED_ASSERT)</span><a name="l00034"></a><a class="code" href="_portability_8h.html#a1">00034</a> <span class="preprocessor"></span><span class="preprocessor"># define CPPUNIT_ENABLE_NAKED_ASSERT 0</span>00035 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00036 <span class="preprocessor"></span>00037 <span class="comment">/* Define to 1 if you wish to have the old-style CU_TEST family</span>00038 <span class="comment"> of macros. */</span>00039 <span class="preprocessor">#if !defined(CPPUNIT_ENABLE_CU_TEST_MACROS)</span><a name="l00040"></a><a class="code" href="_portability_8h.html#a2">00040</a> <span class="preprocessor"></span><span class="preprocessor"># define CPPUNIT_ENABLE_CU_TEST_MACROS 0</span>00041 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00042 <span class="preprocessor"></span>00043 <span class="comment">/* Define to 1 if the preprocessor expands (#foo) to "foo" (quotes incl.) </span>00044 <span class="comment"> I don't think there is any C preprocess that does NOT support this! */</span>00045 <span class="preprocessor">#if !defined(CPPUNIT_HAVE_CPP_SOURCE_ANNOTATION)</span>00046 <span class="preprocessor"></span><span class="preprocessor"># define CPPUNIT_HAVE_CPP_SOURCE_ANNOTATION 1</span>00047 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00048 <span class="preprocessor"></span>00049 <span class="comment">/* Assumes that STL and CppUnit are in global space if the compiler does not</span>00050 <span class="comment"> support namespace. */</span>00051 <span class="preprocessor">#if !defined(CPPUNIT_HAVE_NAMESPACES)</span>00052 <span class="preprocessor"></span><span class="preprocessor"># if !defined(CPPUNIT_NO_NAMESPACE)</span>00053 <span class="preprocessor"></span><span class="preprocessor"># define CPPUNIT_NO_NAMESPACE 1</span>00054 <span class="preprocessor"></span><span class="preprocessor"># endif // !defined(CPPUNIT_NO_NAMESPACE)</span>00055 <span class="preprocessor"></span><span class="preprocessor"># if !defined(CPPUNIT_NO_STD_NAMESPACE)</span>00056 <span class="preprocessor"></span><span class="preprocessor"># define CPPUNIT_NO_STD_NAMESPACE 1</span>00057 <span class="preprocessor"></span><span class="preprocessor"># endif // !defined(CPPUNIT_NO_STD_NAMESPACE)</span>00058 <span class="preprocessor"></span><span class="preprocessor">#endif // !defined(CPPUNIT_HAVE_NAMESPACES)</span>00059 <span class="preprocessor"></span>00060 <span class="comment">/* Define CPPUNIT_STD_NEED_ALLOCATOR to 1 if you need to specify</span>00061 <span class="comment"> * the allocator you used when instantiating STL container. Typically</span>00062 <span class="comment"> * used for compilers that do not support template default parameter.</span>00063 <span class="comment"> * CPPUNIT_STD_ALLOCATOR will be used as the allocator. Default is</span>00064 <span class="comment"> * std::allocator. On some compilers, you may need to change this to</span>00065 <span class="comment"> * std::allocator<T>.</span>00066 <span class="comment"> */</span>00067 <span class="preprocessor">#if CPPUNIT_STD_NEED_ALLOCATOR</span>00068 <span class="preprocessor"></span><span class="preprocessor"># if !defined(CPPUNIT_STD_ALLOCATOR)</span>00069 <span class="preprocessor"></span><span class="preprocessor"># define CPPUNIT_STD_ALLOCATOR std::allocator</span>00070 <span class="preprocessor"></span><span class="preprocessor"># endif // !defined(CPPUNIT_STD_ALLOCATOR)</span>00071 <span class="preprocessor"></span><span class="preprocessor">#endif // defined(CPPUNIT_STD_NEED_ALLOCATOR)</span>00072 <span class="preprocessor"></span>00073 00074 <span class="comment">// Compiler error location format for CompilerOutputter</span>00075 <span class="comment">// If not define, assumes that it's gcc</span>00076 <span class="comment">// See class CompilerOutputter for format.</span>00077 <span class="preprocessor">#if !defined(CPPUNIT_COMPILER_LOCATION_FORMAT)</span><a name="l00078"></a><a class="code" href="_portability_8h.html#a3">00078</a> <span class="preprocessor"></span><span class="preprocessor"># define CPPUNIT_COMPILER_LOCATION_FORMAT "%f:%l:"</span>00079 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00080 <span class="preprocessor"></span>00081 <span class="comment">// If CPPUNIT_HAVE_CPP_CAST is defined, then c++ style cast will be used,</span>00082 <span class="comment">// otherwise, C style cast are used.</span>00083 <span class="preprocessor">#if defined( CPPUNIT_HAVE_CPP_CAST )</span>00084 <span class="preprocessor"></span><span class="preprocessor"># define CPPUNIT_CONST_CAST( TargetType, pointer ) \</span>00085 <span class="preprocessor"> const_cast<TargetType>( pointer )</span>00086 <span class="preprocessor"></span>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -