summaryrefslogtreecommitdiff
path: root/src/cppunit/TestCase.cpp
diff options
context:
space:
mode:
authorBastiaan Bakker <bastiaan.bakker@lifeline.nl>2001-05-30 20:49:01 +0000
committerBastiaan Bakker <bastiaan.bakker@lifeline.nl>2001-05-30 20:49:01 +0000
commitbc6338edfd9b10327c83142fef1e427c5cb3e80f (patch)
tree519645c9b02171f9982507bd10a0497f3cc623d3 /src/cppunit/TestCase.cpp
parent0968f4b9e940f9ef16937b43339c9ec2c9937eff (diff)
downloadcppunit-bc6338edfd9b10327c83142fef1e427c5cb3e80f.tar.gz
(toString): put type_info in std namespace and inside CU_USE_TYPEINFO ifdef.
Diffstat (limited to 'src/cppunit/TestCase.cpp')
-rw-r--r--src/cppunit/TestCase.cpp12
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