00001 #ifndef CPPUNIT_PORTABILITY_H
00002 #define CPPUNIT_PORTABILITY_H
00003
00004 #if defined(_WIN32) && !defined(WIN32)
00005 # define WIN32 1
00006 #endif
00007
00008
00009 #if defined(__BORLANDC__)
00010 # include <cppunit/config/config-bcb5.h>
00011 #elif defined (_MSC_VER)
00012 # if _MSC_VER == 1200 && defined(_WIN32_WCE) //evc4
00013 # include <cppunit/config/config-evc4.h>
00014 # else
00015 # include <cppunit/config/config-msvc6.h>
00016 # endif
00017 #else
00018 # include <cppunit/config-auto.h>
00019 #endif
00020
00021
00022 #ifndef CPPUNIT_VERSION
00023 #define CPPUNIT_VERSION "1.10.4"
00024 #endif
00025
00026 #include <cppunit/config/CppUnitApi.h>
00027 #include <cppunit/config/SelectDllLoader.h>
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #if !defined(CPPUNIT_ENABLE_NAKED_ASSERT)
00038 # define CPPUNIT_ENABLE_NAKED_ASSERT 0
00039 #endif
00040
00041
00042
00043 #if !defined(CPPUNIT_ENABLE_CU_TEST_MACROS)
00044 # define CPPUNIT_ENABLE_CU_TEST_MACROS 0
00045 #endif
00046
00047
00048
00049 #if !defined(CPPUNIT_HAVE_CPP_SOURCE_ANNOTATION)
00050 # define CPPUNIT_HAVE_CPP_SOURCE_ANNOTATION 1
00051 #endif
00052
00053
00054
00055 #if !defined(CPPUNIT_HAVE_NAMESPACES)
00056 # if !defined(CPPUNIT_NO_NAMESPACE)
00057 # define CPPUNIT_NO_NAMESPACE 1
00058 # endif // !defined(CPPUNIT_NO_NAMESPACE)
00059 # if !defined(CPPUNIT_NO_STD_NAMESPACE)
00060 # define CPPUNIT_NO_STD_NAMESPACE 1
00061 # endif // !defined(CPPUNIT_NO_STD_NAMESPACE)
00062 #endif // !defined(CPPUNIT_HAVE_NAMESPACES)
00063
00064
00065
00066
00067
00068
00069
00070
00071 #if CPPUNIT_STD_NEED_ALLOCATOR
00072 # if !defined(CPPUNIT_STD_ALLOCATOR)
00073 # define CPPUNIT_STD_ALLOCATOR std::allocator
00074 # endif // !defined(CPPUNIT_STD_ALLOCATOR)
00075 #endif // defined(CPPUNIT_STD_NEED_ALLOCATOR)
00076
00077
00078
00079
00080
00081 #if !defined(CPPUNIT_COMPILER_LOCATION_FORMAT)
00082 #if defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) )
00083
00084 # define CPPUNIT_COMPILER_LOCATION_FORMAT "%p:%l: "
00085 #else
00086 # define CPPUNIT_COMPILER_LOCATION_FORMAT "%f:%l:"
00087 #endif
00088 #endif
00089
00090
00091
00092 #if defined( CPPUNIT_HAVE_CPP_CAST )
00093 # define CPPUNIT_CONST_CAST( TargetType, pointer ) \
00094 const_cast<TargetType>( pointer )
00095
00096 # define CPPUNIT_STATIC_CAST( TargetType, pointer ) \
00097 static_cast<TargetType>( pointer )
00098 #else // defined( CPPUNIT_HAVE_CPP_CAST )
00099 # define CPPUNIT_CONST_CAST( TargetType, pointer ) \
00100 ((TargetType)( pointer ))
00101 # define CPPUNIT_STATIC_CAST( TargetType, pointer ) \
00102 ((TargetType)( pointer ))
00103 #endif // defined( CPPUNIT_HAVE_CPP_CAST )
00104
00105
00106
00107 #if defined(CPPUNIT_NO_STD_NAMESPACE)
00108 # undef std
00109 # define std
00110 #endif // defined(CPPUNIT_NO_STD_NAMESPACE)
00111
00112
00113
00114 #if defined(CPPUNIT_NO_NAMESPACE)
00115 # define CPPUNIT_NS_BEGIN
00116 # define CPPUNIT_NS_END
00117 # define CPPUNIT_NS
00118 #else // defined(CPPUNIT_NO_NAMESPACE)
00119 # define CPPUNIT_NS_BEGIN namespace CppUnit {
00120 # define CPPUNIT_NS_END }
00121 # define CPPUNIT_NS CppUnit
00122 #endif // defined(CPPUNIT_NO_NAMESPACE)
00123
00134 #define CPPUNIT_STRINGIZE( symbol ) _CPPUNIT_DO_STRINGIZE( symbol )
00135
00137 #define _CPPUNIT_DO_STRINGIZE( symbol ) #symbol
00138
00157 #define CPPUNIT_JOIN( symbol1, symbol2 ) _CPPUNIT_DO_JOIN( symbol1, symbol2 )
00158
00160 #define _CPPUNIT_DO_JOIN( symbol1, symbol2 ) _CPPUNIT_DO_JOIN2( symbol1, symbol2 )
00161
00163 #define _CPPUNIT_DO_JOIN2( symbol1, symbol2 ) symbol1##symbol2
00164
00169 #define CPPUNIT_MAKE_UNIQUE_NAME( prefix ) CPPUNIT_JOIN( prefix, __LINE__ )
00170
00173 #if !defined(CPPUNIT_WRAP_COLUMN)
00174 # define CPPUNIT_WRAP_COLUMN 79
00175 #endif
00176
00177 #endif // CPPUNIT_PORTABILITY_H