summaryrefslogtreecommitdiff
path: root/include/cppunit/extensions
diff options
context:
space:
mode:
authorBastiaan Bakker <bastiaan.bakker@lifeline.nl>2001-05-06 16:21:31 +0000
committerBastiaan Bakker <bastiaan.bakker@lifeline.nl>2001-05-06 16:21:31 +0000
commitc29893f76ae8c37e14eb99f25d517535c1d37b42 (patch)
treee32a57e2fb34631739510a726e3865d3f3db9a32 /include/cppunit/extensions
parent92c488aa6f744a1f0f0bbc92ad485d5cc715736a (diff)
downloadcppunit-c29893f76ae8c37e14eb99f25d517535c1d37b42.tar.gz
Removed unnecessary #include's of TestSuiteBuilder.h
Removed RTTI dependent stuff from TestSuite and TestSuiteBuilder.
Diffstat (limited to 'include/cppunit/extensions')
-rw-r--r--include/cppunit/extensions/AutoRegisterSuite.h2
-rw-r--r--include/cppunit/extensions/HelperMacros.h8
-rw-r--r--include/cppunit/extensions/Orthodox.h6
-rw-r--r--include/cppunit/extensions/TestSuiteBuilder.h6
-rw-r--r--include/cppunit/extensions/TestSuiteFactory.h2
5 files changed, 12 insertions, 12 deletions
diff --git a/include/cppunit/extensions/AutoRegisterSuite.h b/include/cppunit/extensions/AutoRegisterSuite.h
index e80122f..21ef224 100644
--- a/include/cppunit/extensions/AutoRegisterSuite.h
+++ b/include/cppunit/extensions/AutoRegisterSuite.h
@@ -17,7 +17,7 @@ namespace CppUnit {
* \param TestCaseType Type of the test case which suite is registered.
* \see CU_TEST_SUITE_REGISTRATION.
*/
- template<class TestCaseType>
+ template<typename TestCaseType>
class AutoRegisterSuite
{
public:
diff --git a/include/cppunit/extensions/HelperMacros.h b/include/cppunit/extensions/HelperMacros.h
index 0cb3495..126483e 100644
--- a/include/cppunit/extensions/HelperMacros.h
+++ b/include/cppunit/extensions/HelperMacros.h
@@ -6,6 +6,7 @@
#ifndef CPPUNIT_EXTENSIONS_HELPERMACROS_H
#define CPPUNIT_EXTENSIONS_HELPERMACROS_H
+#include <string>
#include <cppunit/extensions/AutoRegisterSuite.h>
#include <cppunit/extensions/TestSuiteBuilder.h>
@@ -49,7 +50,7 @@
* You only need to specify the full qualified name of the class. For example:
*
* \code
- * template<class CharType>
+ * template<typename CharType>
* class StringTest : public CppUnit::Testcase {
* CU_TEST_SUITE( StringTest<CharType> );
* CU_TEST( testAppend );
@@ -76,11 +77,12 @@
static CppUnit::Test *suite() \
{ \
__ThisTestCaseType *test =NULL; \
- CppUnit::TestSuiteBuilder<__ThisTestCaseType> suite; \
+ CppUnit::TestSuiteBuilder<__ThisTestCaseType> \
+ suite(std::string(#ATestCaseType)); \
__ThisTestCaseType::registerTests( suite, test ); \
return suite.takeSuite(); \
} \
- template<class TestCaseType> \
+ template<typename TestCaseType> \
static void \
registerTests( CppUnit::TestSuiteBuilder<TestCaseType> &suite, \
TestCaseType *test ) \
diff --git a/include/cppunit/extensions/Orthodox.h b/include/cppunit/extensions/Orthodox.h
index 109afae..e7667d1 100644
--- a/include/cppunit/extensions/Orthodox.h
+++ b/include/cppunit/extensions/Orthodox.h
@@ -38,7 +38,7 @@ namespace CppUnit {
*/
-template <class ClassUnderTest> class Orthodox : public TestCase
+template <typename ClassUnderTest> class Orthodox : public TestCase
{
public:
Orthodox () : TestCase ("Orthodox") {}
@@ -52,7 +52,7 @@ protected:
// Run an orthodoxy test
-template <class ClassUnderTest> void Orthodox<ClassUnderTest>::runTest ()
+template <typename ClassUnderTest> void Orthodox<ClassUnderTest>::runTest ()
{
// make sure we have a default constructor
ClassUnderTest a, b, c;
@@ -82,7 +82,7 @@ template <class ClassUnderTest> void Orthodox<ClassUnderTest>::runTest ()
// Exercise a call
-template <class ClassUnderTest> ClassUnderTest Orthodox<ClassUnderTest>::call (ClassUnderTest object)
+template <typename ClassUnderTest> ClassUnderTest Orthodox<ClassUnderTest>::call (ClassUnderTest object)
{
return object;
}
diff --git a/include/cppunit/extensions/TestSuiteBuilder.h b/include/cppunit/extensions/TestSuiteBuilder.h
index b20d2f9..d85683d 100644
--- a/include/cppunit/extensions/TestSuiteBuilder.h
+++ b/include/cppunit/extensions/TestSuiteBuilder.h
@@ -7,7 +7,7 @@
namespace CppUnit {
- template<class Fixture>
+ template<typename Fixture>
class TestSuiteBuilder
{
public:
@@ -17,11 +17,9 @@ namespace CppUnit {
{
}
-#ifdef USE_TYPEINFO
- TestSuiteBuilder() : m_suite( new TestSuite( typeid( Fixture) ) )
+ TestSuiteBuilder(std::string name) : m_suite( new TestSuite(name) )
{
}
-#endif // USE_TYPEINFO
TestSuite *suite() const
{
diff --git a/include/cppunit/extensions/TestSuiteFactory.h b/include/cppunit/extensions/TestSuiteFactory.h
index 1df6c70..b1e39c3 100644
--- a/include/cppunit/extensions/TestSuiteFactory.h
+++ b/include/cppunit/extensions/TestSuiteFactory.h
@@ -7,7 +7,7 @@ namespace CppUnit {
class Test;
- template<class TestCaseType>
+ template<typename TestCaseType>
class TestSuiteFactory : public AbstractTestFactory
{
public: