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.14.0"
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 #if !defined(CPPUNIT_COMPILER_LOCATION_FORMAT)
00068 #if defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) )
00069
00070 # define CPPUNIT_COMPILER_LOCATION_FORMAT "%p:%l: "
00071 #else
00072 # define CPPUNIT_COMPILER_LOCATION_FORMAT "%f:%l:"
00073 #endif
00074 #endif
00075
00076
00077
00078 #if defined( CPPUNIT_HAVE_CPP_CAST )
00079 # define CPPUNIT_CONST_CAST( TargetType, pointer ) \
00080 const_cast<TargetType>( pointer )
00081
00082 # define CPPUNIT_STATIC_CAST( TargetType, pointer ) \
00083 static_cast<TargetType>( pointer )
00084 #else // defined( CPPUNIT_HAVE_CPP_CAST )
00085 # define CPPUNIT_CONST_CAST( TargetType, pointer ) \
00086 ((TargetType)( pointer ))
00087 # define CPPUNIT_STATIC_CAST( TargetType, pointer ) \
00088 ((TargetType)( pointer ))
00089 #endif // defined( CPPUNIT_HAVE_CPP_CAST )
00090
00091
00092
00093 #if defined(CPPUNIT_NO_STD_NAMESPACE)
00094 # undef std
00095 # define std
00096 #endif // defined(CPPUNIT_NO_STD_NAMESPACE)
00097
00098
00099
00100 #if defined(CPPUNIT_NO_NAMESPACE)
00101 # define CPPUNIT_NS_BEGIN
00102 # define CPPUNIT_NS_END
00103 # define CPPUNIT_NS
00104 #else // defined(CPPUNIT_NO_NAMESPACE)
00105 # define CPPUNIT_NS_BEGIN namespace CppUnit {
00106 # define CPPUNIT_NS_END }
00107 # define CPPUNIT_NS CppUnit
00108 #endif // defined(CPPUNIT_NO_NAMESPACE)
00109
00120 #define CPPUNIT_STRINGIZE( symbol ) _CPPUNIT_DO_STRINGIZE( symbol )
00121
00123 #define _CPPUNIT_DO_STRINGIZE( symbol ) #symbol
00124
00143 #define CPPUNIT_JOIN( symbol1, symbol2 ) _CPPUNIT_DO_JOIN( symbol1, symbol2 )
00144
00146 #define _CPPUNIT_DO_JOIN( symbol1, symbol2 ) _CPPUNIT_DO_JOIN2( symbol1, symbol2 )
00147
00149 #define _CPPUNIT_DO_JOIN2( symbol1, symbol2 ) symbol1##symbol2
00150
00153 #ifndef CPPUNIT_UNIQUE_COUNTER
00154 # define CPPUNIT_UNIQUE_COUNTER __LINE__
00155 #endif
00156
00161 #define CPPUNIT_MAKE_UNIQUE_NAME( prefix ) CPPUNIT_JOIN( prefix, CPPUNIT_UNIQUE_COUNTER )
00162
00165 #if !defined(CPPUNIT_WRAP_COLUMN)
00166 # define CPPUNIT_WRAP_COLUMN 79
00167 #endif
00168
00169 #endif // CPPUNIT_PORTABILITY_H