summaryrefslogtreecommitdiff
path: root/src/cppunit
diff options
context:
space:
mode:
Diffstat (limited to 'src/cppunit')
-rw-r--r--src/cppunit/Makefile.am3
-rw-r--r--src/cppunit/TestNamer.cpp40
-rw-r--r--src/cppunit/cppunit.dsp8
-rw-r--r--src/cppunit/cppunit_dll.dsp8
4 files changed, 58 insertions, 1 deletions
diff --git a/src/cppunit/Makefile.am b/src/cppunit/Makefile.am
index 965ad3c..c0a45f7 100644
--- a/src/cppunit/Makefile.am
+++ b/src/cppunit/Makefile.am
@@ -1,5 +1,5 @@
#
-# $Id: Makefile.am,v 1.31 2002-05-23 18:38:39 blep Exp $
+# $Id: Makefile.am,v 1.32 2002-05-25 09:27:39 blep Exp $
#
EXTRA_DIST = cppunit.dsp cppunit_dll.dsp DllMain.cpp
@@ -27,6 +27,7 @@ libcppunit_la_SOURCES = \
TestFactoryRegistry.cpp \
TestFailure.cpp \
TestLeaf.cpp \
+ TestNamer.cpp \
TestPath.cpp \
TestPlugInAdapter.cpp \
TestResult.cpp \
diff --git a/src/cppunit/TestNamer.cpp b/src/cppunit/TestNamer.cpp
new file mode 100644
index 0000000..b5e096c
--- /dev/null
+++ b/src/cppunit/TestNamer.cpp
@@ -0,0 +1,40 @@
+#include <cppunit/extensions/TestNamer.h>
+#include <cppunit/extensions/TypeInfoHelper.h>
+#include <string>
+
+
+namespace CppUnit
+{
+
+
+#if CPPUNIT_HAVE_RTTI
+TestNamer::TestNamer( const std::type_info &typeInfo )
+{
+ m_fixtureName = TypeInfoHelper::getClassName( typeInfo );
+}
+#endif
+
+
+TestNamer::TestNamer( const std::string &fixtureName )
+ : m_fixtureName( fixtureName )
+{
+}
+
+
+std::string
+TestNamer::getFixtureName() const
+{
+ return m_fixtureName;
+}
+
+
+std::string
+TestNamer::getTestNameFor( const std::string &testMethodName ) const
+{
+ return getFixtureName() + "::" + testMethodName;
+}
+
+
+
+
+} // namespace CppUnit
diff --git a/src/cppunit/cppunit.dsp b/src/cppunit/cppunit.dsp
index b8c5c97..e4f4d36 100644
--- a/src/cppunit/cppunit.dsp
+++ b/src/cppunit/cppunit.dsp
@@ -393,6 +393,14 @@ SOURCE=..\..\include\cppunit\extensions\TestFactoryRegistry.h
# End Source File
# Begin Source File
+SOURCE=.\TestNamer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\cppunit\extensions\TestNamer.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\include\cppunit\extensions\TestSuiteBuilder.h
# End Source File
# Begin Source File
diff --git a/src/cppunit/cppunit_dll.dsp b/src/cppunit/cppunit_dll.dsp
index 9f6937b..2acd5a5 100644
--- a/src/cppunit/cppunit_dll.dsp
+++ b/src/cppunit/cppunit_dll.dsp
@@ -155,6 +155,14 @@ SOURCE=..\..\include\cppunit\extensions\TestFactoryRegistry.h
# End Source File
# Begin Source File
+SOURCE=.\TestNamer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\cppunit\extensions\TestNamer.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\include\cppunit\extensions\TestSuiteBuilder.h
# End Source File
# Begin Source File