summaryrefslogtreecommitdiff
path: root/include/cppunit
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
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')
-rw-r--r--include/cppunit/TestCaller.h4
-rw-r--r--include/cppunit/TestSuite.h3
-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
7 files changed, 14 insertions, 17 deletions
diff --git a/include/cppunit/TestCaller.h b/include/cppunit/TestCaller.h
index 6af6e79..9262b86 100644
--- a/include/cppunit/TestCaller.h
+++ b/include/cppunit/TestCaller.h
@@ -41,7 +41,7 @@ namespace CppUnit {
* \see TestCase
*/
- template <class Fixture>
+ template <typename Fixture>
class TestCaller : public TestCase
{
typedef void (Fixture::*TestMethod)();
@@ -89,7 +89,7 @@ namespace CppUnit {
* \param testMethod Method called by the TestCaller.
* \return TestCaller for the specified method.
*/
- template<class Fixture>
+ template<typename Fixture>
Test *makeTestCaller( std::string name, void (Fixture::*testMethod)() )
{
return new TestCaller<Fixture>( name, testMethod );
diff --git a/include/cppunit/TestSuite.h b/include/cppunit/TestSuite.h
index 7934ad4..f61cbf6 100644
--- a/include/cppunit/TestSuite.h
+++ b/include/cppunit/TestSuite.h
@@ -32,9 +32,6 @@ namespace CppUnit {
{
public:
TestSuite (std::string name = "");
-#ifdef USE_TYPEINFO
- TestSuite (const std::type_info &info );
-#endif // USE_TYPEINFO
~TestSuite ();
void run (TestResult *result);
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: