diff options
Diffstat (limited to '3rdParty/CppUnit/src/include/cppunit/extensions/TestNamer.h')
-rw-r--r-- | 3rdParty/CppUnit/src/include/cppunit/extensions/TestNamer.h | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/3rdParty/CppUnit/src/include/cppunit/extensions/TestNamer.h b/3rdParty/CppUnit/src/include/cppunit/extensions/TestNamer.h index 5a6471c..0c8fb31 100644 --- a/3rdParty/CppUnit/src/include/cppunit/extensions/TestNamer.h +++ b/3rdParty/CppUnit/src/include/cppunit/extensions/TestNamer.h @@ -5,6 +5,5 @@ #include <string> +#include <cppunit/tools/StringHelper.h> -#if CPPUNIT_HAVE_RTTI -# include <typeinfo> -#endif +#include <typeinfo> @@ -15,6 +14,3 @@ * - * 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 * @@ -31,11 +27,4 @@ */ -#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 - - @@ -43,3 +32,2 @@ CPPUNIT_NS_BEGIN - /*! \brief Names a test or a fixture suite. @@ -52,3 +40,2 @@ class CPPUNIT_API TestNamer public: -#if CPPUNIT_HAVE_RTTI /*! \brief Constructs a namer using the fixture's type-info. @@ -57,3 +44,2 @@ public: TestNamer( const std::type_info &typeInfo ); -#endif @@ -80,2 +66,8 @@ public: + template<typename E> + std::string getTestNameFor( const std::string& testMethodName, const E& val) const + { + return getTestNameFor(testMethodName) + " with parameter: " + CPPUNIT_NS::StringHelper::toString(val); + } + protected: @@ -84,3 +76,2 @@ protected: - CPPUNIT_NS_END |