From b08ecaecc1e39b7b01e02b7b73559d8b34ff46a5 Mon Sep 17 00:00:00 2001 From: Bastiaan Bakker Date: Sun, 29 Apr 2001 13:09:16 +0000 Subject: Merged Baptiste Lepilleurs CppUnitW 1.2. Some differences: TypeInfo stuff (in TestSuite) compiled in only if USE_TYPEINFO is set. TestSuite.getTests now returns a const ref instead of taking a ref as param. Removed auto_ptr stuff from TestFactoryRegistry: auto_ptr cannot be used in containers. --- src/cppunit/TestSuite.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/cppunit/TestSuite.cpp') diff --git a/src/cppunit/TestSuite.cpp b/src/cppunit/TestSuite.cpp index 8fe5e65..e776cb2 100644 --- a/src/cppunit/TestSuite.cpp +++ b/src/cppunit/TestSuite.cpp @@ -1,5 +1,8 @@ #include "cppunit/TestSuite.h" #include "cppunit/TestResult.h" +#ifdef USE_TYPEINFO +#include "TypeInfoHelper.h" +#endif // USE_TYPEINFO namespace CppUnit { @@ -52,6 +55,17 @@ TestSuite::TestSuite (std::string name) { } +#ifdef USE_TYPEINFO +/** Constructs a test suite named after the specified type_info. + * \param info type_info used to name the suite. The 'class' prefix + * is stripped from the name. + */ +TestSuite::TestSuite(const std::type_info &info ) : + m_name( TypeInfoHelper::getClassName( info ) ) +{ +} +#endif // USE_TYPEINFO + /// Destructor TestSuite::~TestSuite () @@ -82,5 +96,11 @@ std::string return m_name; } +const std::vector& + TestSuite::getTests () const +{ + return m_tests; +} + } // namespace CppUnit -- cgit v1.2.1