From 42bd37a4b8d8feab2d30761648b51eaf20623abb Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sat, 15 Oct 2016 17:28:02 +0200 Subject: we always require RTTI now RTTI is supported by any decent compiler and with the mandatory c++11 support we are no longer supporting older compilers anyway. --- include/cppunit/config/config-bcb5.h | 10 ---------- include/cppunit/config/config-evc4.h | 10 ---------- include/cppunit/config/config-mac.h | 10 ---------- include/cppunit/config/config-msvc6.h | 14 -------------- include/cppunit/extensions/TestNamer.h | 20 ++------------------ include/cppunit/extensions/TypeInfoHelper.h | 6 ------ 6 files changed, 2 insertions(+), 68 deletions(-) (limited to 'include/cppunit') diff --git a/include/cppunit/config/config-bcb5.h b/include/cppunit/config/config-bcb5.h index d491452..7bcde53 100644 --- a/include/cppunit/config/config-bcb5.h +++ b/include/cppunit/config/config-bcb5.h @@ -26,16 +26,6 @@ #define CPPUNIT_HAVE_NAMESPACES 1 #endif -/* define if the compiler supports Run-Time Type Identification */ -#ifndef CPPUNIT_HAVE_RTTI -#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 - #define CPPUNIT_HAVE_SSTREAM 1 /* Name of package */ diff --git a/include/cppunit/config/config-evc4.h b/include/cppunit/config/config-evc4.h index a791698..ae93ff3 100644 --- a/include/cppunit/config/config-evc4.h +++ b/include/cppunit/config/config-evc4.h @@ -30,16 +30,6 @@ #define CPPUNIT_HAVE_NAMESPACES 1 #endif -/* define if the compiler supports Run-Time Type Identification */ -#ifndef CPPUNIT_HAVE_RTTI -#define CPPUNIT_HAVE_RTTI 0 -#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 - #define CPPUNIT_NO_STREAM 1 #define CPPUNIT_NO_ASSERT 1 diff --git a/include/cppunit/config/config-mac.h b/include/cppunit/config/config-mac.h index 4ace906..755429b 100644 --- a/include/cppunit/config/config-mac.h +++ b/include/cppunit/config/config-mac.h @@ -34,11 +34,6 @@ #define CPPUNIT_HAVE_NAMESPACES 1 #endif -/* define if the compiler supports Run-Time Type Identification */ -#ifndef CPPUNIT_HAVE_RTTI -#define CPPUNIT_HAVE_RTTI 1 -#endif - /* define if the compiler has stringstream */ #ifndef CPPUNIT_HAVE_SSTREAM #define CPPUNIT_HAVE_SSTREAM 1 @@ -49,10 +44,5 @@ #define CPPUNIT_HAVE_STRSTREAM 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 - /* _INCLUDE_CPPUNIT_CONFIG_MAC_H */ #endif diff --git a/include/cppunit/config/config-msvc6.h b/include/cppunit/config/config-msvc6.h index 54bce82..2607a46 100644 --- a/include/cppunit/config/config-msvc6.h +++ b/include/cppunit/config/config-msvc6.h @@ -30,20 +30,6 @@ #define CPPUNIT_HAVE_NAMESPACES 1 #endif -/* define if the compiler supports Run-Time Type Identification */ -#ifndef CPPUNIT_HAVE_RTTI -# ifdef _CPPRTTI // Defined by the compiler option /GR -# define CPPUNIT_HAVE_RTTI 1 -# else -# define CPPUNIT_HAVE_RTTI 0 -# endif -#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 - #define CPPUNIT_HAVE_SSTREAM 1 /* Name of package */ diff --git a/include/cppunit/extensions/TestNamer.h b/include/cppunit/extensions/TestNamer.h index 5a6471c..3907569 100644 --- a/include/cppunit/extensions/TestNamer.h +++ b/include/cppunit/extensions/TestNamer.h @@ -4,19 +4,14 @@ #include #include -#if CPPUNIT_HAVE_RTTI -# include -#endif +#include /*! \def CPPUNIT_TESTNAMER_DECL( variableName, FixtureType ) * \brief Declares a TestNamer. * - * Declares a TestNamer for the specified type, using RTTI if enabled, otherwise - * using macro string expansion. - * - * RTTI is used if CPPUNIT_USE_TYPEINFO_NAME is defined and not null. + * Declares a TestNamer for the specified type * * \code * void someMethod() @@ -29,19 +24,11 @@ * \relates TestNamer * \see TestNamer */ -#if CPPUNIT_USE_TYPEINFO_NAME # define CPPUNIT_TESTNAMER_DECL( variableName, FixtureType ) \ CPPUNIT_NS::TestNamer variableName( typeid(FixtureType) ) -#else -# define CPPUNIT_TESTNAMER_DECL( variableName, FixtureType ) \ - CPPUNIT_NS::TestNamer variableName( std::string(#FixtureType) ) -#endif - - CPPUNIT_NS_BEGIN - /*! \brief Names a test or a fixture suite. * * TestNamer is usually instantiated using CPPUNIT_TESTNAMER_DECL. @@ -50,12 +37,10 @@ CPPUNIT_NS_BEGIN class CPPUNIT_API TestNamer { public: -#if CPPUNIT_HAVE_RTTI /*! \brief Constructs a namer using the fixture's type-info. * \param typeInfo Type-info of the fixture type. Use to name the fixture suite. */ TestNamer( const std::type_info &typeInfo ); -#endif /*! \brief Constructs a namer using the specified fixture name. * \param fixtureName Name of the fixture suite. Usually extracted using a macro. @@ -82,7 +67,6 @@ protected: std::string m_fixtureName; }; - CPPUNIT_NS_END #endif // CPPUNIT_EXTENSIONS_TESTNAMER_H diff --git a/include/cppunit/extensions/TypeInfoHelper.h b/include/cppunit/extensions/TypeInfoHelper.h index c0ecdbc..1adec83 100644 --- a/include/cppunit/extensions/TypeInfoHelper.h +++ b/include/cppunit/extensions/TypeInfoHelper.h @@ -3,14 +3,11 @@ #include -#if CPPUNIT_HAVE_RTTI - #include #include CPPUNIT_NS_BEGIN - /**! \brief Helper to use type_info. */ class CPPUNIT_API TypeInfoHelper @@ -25,9 +22,6 @@ CPPUNIT_NS_BEGIN static std::string getClassName( const std::type_info &info ); }; - CPPUNIT_NS_END -#endif // CPPUNIT_HAVE_RTTI - #endif // CPPUNIT_TYPEINFOHELPER_H -- cgit v1.2.1