diff options
Diffstat (limited to 'src/cppunit/TestCase.cpp')
| -rw-r--r-- | src/cppunit/TestCase.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
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 |
