From bc6338edfd9b10327c83142fef1e427c5cb3e80f Mon Sep 17 00:00:00 2001 From: Bastiaan Bakker Date: Wed, 30 May 2001 20:49:01 +0000 Subject: (toString): put type_info in std namespace and inside CU_USE_TYPEINFO ifdef. --- src/cppunit/TestCase.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/cppunit/TestCase.cpp') diff --git a/src/cppunit/TestCase.cpp b/src/cppunit/TestCase.cpp index 5d89eaf..1b623c9 100644 --- a/src/cppunit/TestCase.cpp +++ b/src/cppunit/TestCase.cpp @@ -113,8 +113,16 @@ void TestCase::tearDown () std::string TestCase::toString () const { - const type_info& thisClass = typeid (*this); - return std::string (thisClass.name ()) + "." + getName (); + std::string className; + +#ifdef CU_USE_TYPEINFO + const std::type_info& thisClass = typeid (*this); + className = thisClass.name(); +#else + className = "TestCase"; +#endif // CU_USE_TYPEINFO + + return className + "." + getName (); } } // namespace CppUnit -- cgit v1.2.1