diff options
| author | Steve M. Robbins <smr@sumost.ca> | 2001-07-06 00:31:25 +0000 |
|---|---|---|
| committer | Steve M. Robbins <smr@sumost.ca> | 2001-07-06 00:31:25 +0000 |
| commit | a90452b2ef0c9366118ae1be78d798a0198ae363 (patch) | |
| tree | 7ad83daa72ff5a84609528e57bdc50b86c28309f /include/cppunit | |
| parent | 83766a55021bea4fa506ece7ad0be11c6dcff6f8 (diff) | |
| download | cppunit-a90452b2ef0c9366118ae1be78d798a0198ae363.tar.gz | |
Change from CPPUNIT_USE_TYPEINFO to CPPUNIT_USE_TYPEINFO_NAME
Diffstat (limited to 'include/cppunit')
| -rw-r--r-- | include/cppunit/Portability.h | 6 | ||||
| -rw-r--r-- | include/cppunit/TestCaller.h | 8 | ||||
| -rw-r--r-- | include/cppunit/config-bcb5.h | 5 | ||||
| -rw-r--r-- | include/cppunit/config-msvc6.h | 5 | ||||
| -rw-r--r-- | include/cppunit/extensions/HelperMacros.h | 6 | ||||
| -rw-r--r-- | include/cppunit/extensions/TestSuiteBuilder.h | 6 | ||||
| -rw-r--r-- | include/cppunit/extensions/TypeInfoHelper.h | 4 |
7 files changed, 22 insertions, 18 deletions
diff --git a/include/cppunit/Portability.h b/include/cppunit/Portability.h index 9c81a3b..3335dbf 100644 --- a/include/cppunit/Portability.h +++ b/include/cppunit/Portability.h @@ -15,12 +15,6 @@ * If the user has not done so, we chose default values. */ -/* FIXME: does not belong in Portability.h (?) */ -/* Define to 1 if the compiler supports Run-Time Type Identification */ -#ifndef CPPUNIT_USE_TYPEINFO -#define CPPUNIT_USE_TYPEINFO CPPUNIT_HAVE_RTTI -#endif - /* Define to 1 if you wish to have the old-style macros assert(), assertEqual(), assertDoublesEqual(), and assertLongsEqual() */ diff --git a/include/cppunit/TestCaller.h b/include/cppunit/TestCaller.h index 342001b..dee0b6d 100644 --- a/include/cppunit/TestCaller.h +++ b/include/cppunit/TestCaller.h @@ -4,9 +4,9 @@ #include <cppunit/TestCase.h> #include <cppunit/Exception.h> -#if CPPUNIT_USE_TYPEINFO +#if CPPUNIT_USE_TYPEINFO_NAME # include <cppunit/extensions/TypeInfoHelper.h> -#endif // CPPUNIT_USE_TYPEINFO +#endif namespace CppUnit { @@ -23,13 +23,13 @@ namespace CppUnit { { static void expectedException() { -#if CPPUNIT_USE_TYPEINFO +#if CPPUNIT_USE_TYPEINFO_NAME std::string message( "Expected exception of type " ); message += TypeInfoHelper::getClassName( typeid( ExceptionType ) ); message += ", but got none"; #else std::string message( "Expected exception but got none" ); -#endif // CPPUNIT_USE_TYPEINFO +#endif throw new Exception( message ); } }; diff --git a/include/cppunit/config-bcb5.h b/include/cppunit/config-bcb5.h index 0009b85..89de30a 100644 --- a/include/cppunit/config-bcb5.h +++ b/include/cppunit/config-bcb5.h @@ -24,6 +24,11 @@ #define CPPUNIT_HAVE_RTTI 1 #endif +/* Define to 1 to use type_info::name() for class names */ +#ifndef CPPUNIT_USE_TYPEINFO_NAME +#define CPPUNIT_USE_TYPEINFO_NAME CPPUNIT_HAVE_RTTI +#endif + /* Name of package */ #ifndef CPPUNIT_PACKAGE #define CPPUNIT_PACKAGE "cppunit" diff --git a/include/cppunit/config-msvc6.h b/include/cppunit/config-msvc6.h index 2ee8bdd..05d28dd 100644 --- a/include/cppunit/config-msvc6.h +++ b/include/cppunit/config-msvc6.h @@ -24,6 +24,11 @@ #define CPPUNIT_HAVE_RTTI 1 #endif +/* Define to 1 to use type_info::name() for class names */ +#ifndef CPPUNIT_USE_TYPEINFO_NAME +#define CPPUNIT_USE_TYPEINFO_NAME CPPUNIT_HAVE_RTTI +#endif + /* Name of package */ #ifndef CPPUNIT_PACKAGE #define CPPUNIT_PACKAGE "cppunit" diff --git a/include/cppunit/extensions/HelperMacros.h b/include/cppunit/extensions/HelperMacros.h index e3355e1..3a10ba7 100644 --- a/include/cppunit/extensions/HelperMacros.h +++ b/include/cppunit/extensions/HelperMacros.h @@ -14,11 +14,11 @@ // The macro __CPPUNIT_SUITE_CTOR_ARGS expand to an expression used to construct // the TestSuiteBuilder with macro CPPUNIT_TEST_SUITE. // -// The name of the suite is obtained using RTTI if CPPUNIT_USE_TYPEINFO is -// defined, otherwise it is extracted from the macro parameter +// The name of the suite is obtained using RTTI if CPPUNIT_USE_TYPEINFO_NAME +// is defined, otherwise it is extracted from the macro parameter // // This macro is for cppunit internal and should not be use otherwise. -#if CPPUNIT_USE_TYPEINFO +#if CPPUNIT_USE_TYPEINFO_NAME # define __CPPUNIT_SUITE_CTOR_ARGS( ATestCaseType ) #else # define __CPPUNIT_SUITE_CTOR_ARGS( ATestCaseType ) (std::string(#ATestCaseType)) diff --git a/include/cppunit/extensions/TestSuiteBuilder.h b/include/cppunit/extensions/TestSuiteBuilder.h index cb1b61c..1db761f 100644 --- a/include/cppunit/extensions/TestSuiteBuilder.h +++ b/include/cppunit/extensions/TestSuiteBuilder.h @@ -6,7 +6,7 @@ #include <cppunit/TestSuite.h> #include <cppunit/TestCaller.h> -#if CPPUNIT_USE_TYPEINFO +#if CPPUNIT_USE_TYPEINFO_NAME # include <cppunit/extensions/TypeInfoHelper.h> #endif @@ -18,13 +18,13 @@ namespace CppUnit { public: typedef void (Fixture::*TestMethod)(); -#if CPPUNIT_USE_TYPEINFO +#if CPPUNIT_USE_TYPEINFO_NAME TestSuiteBuilder() : m_suite( new TestSuite( TypeInfoHelper::getClassName( typeid(Fixture) ) ) ) { } -#endif // CPPUNIT_USE_TYPEINFO +#endif TestSuiteBuilder( TestSuite *suite ) : m_suite( suite ) { diff --git a/include/cppunit/extensions/TypeInfoHelper.h b/include/cppunit/extensions/TypeInfoHelper.h index e1b3ca9..f4008ef 100644 --- a/include/cppunit/extensions/TypeInfoHelper.h +++ b/include/cppunit/extensions/TypeInfoHelper.h @@ -3,7 +3,7 @@ #include <cppunit/Portability.h> -#if CPPUNIT_USE_TYPEINFO +#if CPPUNIT_USE_TYPEINFO_NAME #include <typeinfo> @@ -26,6 +26,6 @@ namespace CppUnit { } // namespace CppUnit -#endif // CPPUNIT_USE_TYPEINFO +#endif #endif // CPPUNIT_TYPEINFOHELPER_H |
