diff options
| author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-07-10 17:50:02 +0000 |
|---|---|---|
| committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-07-10 17:50:02 +0000 |
| commit | 85aa074c02154107459755b2a3ddbc0b5767558a (patch) | |
| tree | f48da462642cd10a74cc836a241b4b8fede53319 /include/cppunit/extensions | |
| parent | ad45759ab7a47c7a7932f7e6be66f3ea106b643b (diff) | |
| download | cppunit-85aa074c02154107459755b2a3ddbc0b5767558a.tar.gz | |
Include/cppunit/extensions/AutoRegisterSuite.
include/cppunit/extensions/AutoRegisterSuite.h:
* include/cppunit/extensions/Orthodox.h:
* include/cppunit/extensions/TestSuiteBuilder.h:
* include/cppunit/extensions/TestSuiteFactory.h:
* include/cppunit/TestCaller.h:
* examples/hierarchy/BoardGameTest.h:
* examples/hierarchy/ChessTest.h: replaced usage of 'typename' in template
declaration with 'class'.
* include/cppunit/ui/text/TestRunner.h:
* src/cppunit/TextTestRunner.cpp: updated to use the generic TestRunner.
Removed methods runTestByName() and runTest(). Inherits
CppUnit::TestRunner.
* include/cppunit/extensions/TestSuiteBuilder.h: removed templatized method
addTestCallerForException(). It is no longer used since release 1.9.8.
* examples/cppunittest/MockTestCase.h
* examples/cppunittest/MockTestCase.cpp: removed the usage of 'mutable'
keyword.
Diffstat (limited to 'include/cppunit/extensions')
| -rw-r--r-- | include/cppunit/extensions/AutoRegisterSuite.h | 2 | ||||
| -rw-r--r-- | include/cppunit/extensions/Orthodox.h | 6 | ||||
| -rw-r--r-- | include/cppunit/extensions/TestSuiteBuilder.h | 16 | ||||
| -rw-r--r-- | include/cppunit/extensions/TestSuiteFactory.h | 2 |
4 files changed, 6 insertions, 20 deletions
diff --git a/include/cppunit/extensions/AutoRegisterSuite.h b/include/cppunit/extensions/AutoRegisterSuite.h index ccf6997..24c2f2c 100644 --- a/include/cppunit/extensions/AutoRegisterSuite.h +++ b/include/cppunit/extensions/AutoRegisterSuite.h @@ -23,7 +23,7 @@ namespace CppUnit { * \see CPPUNIT_TEST_SUITE_REGISTRATION, CPPUNIT_TEST_SUITE_NAMED_REGISTRATION * \see CppUnit::TestFactoryRegistry. */ -template<typename TestCaseType> +template<class TestCaseType> class AutoRegisterSuite { public: diff --git a/include/cppunit/extensions/Orthodox.h b/include/cppunit/extensions/Orthodox.h index 5fc7aab..08c6dd1 100644 --- a/include/cppunit/extensions/Orthodox.h +++ b/include/cppunit/extensions/Orthodox.h @@ -38,7 +38,7 @@ namespace CppUnit { */ -template <typename ClassUnderTest> class Orthodox : public TestCase +template <class ClassUnderTest> class Orthodox : public TestCase { public: Orthodox () : TestCase ("Orthodox") {} @@ -52,7 +52,7 @@ protected: // Run an orthodoxy test -template <typename ClassUnderTest> void Orthodox<ClassUnderTest>::runTest () +template <class ClassUnderTest> void Orthodox<ClassUnderTest>::runTest () { // make sure we have a default constructor ClassUnderTest a, b, c; @@ -82,7 +82,7 @@ template <typename ClassUnderTest> void Orthodox<ClassUnderTest>::runTest () // Exercise a call -template <typename ClassUnderTest> +template <class ClassUnderTest> ClassUnderTest Orthodox<ClassUnderTest>::call (ClassUnderTest object) { return object; diff --git a/include/cppunit/extensions/TestSuiteBuilder.h b/include/cppunit/extensions/TestSuiteBuilder.h index f75e430..ae1c6df 100644 --- a/include/cppunit/extensions/TestSuiteBuilder.h +++ b/include/cppunit/extensions/TestSuiteBuilder.h @@ -19,7 +19,7 @@ namespace CppUnit { * MyTestSuiteName.myTestName * \see TestNamer. */ -template<typename Fixture> +template<class Fixture> class TestSuiteBuilder { public: @@ -74,20 +74,6 @@ public: addTest( test ); } - template<typename ExceptionType> - void addTestCallerForException( std::string methodName, - TestMethod testMethod, - Fixture *fixture, - ExceptionType *dummyPointer ) - { - Test *test = new TestCaller<Fixture,ExceptionType>( - makeTestName( methodName ), - testMethod, - fixture); - addTest( test ); - } - - std::string makeTestName( const std::string &methodName ) { return m_testNamer.getTestNameFor( methodName ); diff --git a/include/cppunit/extensions/TestSuiteFactory.h b/include/cppunit/extensions/TestSuiteFactory.h index 567812d..11605a5 100644 --- a/include/cppunit/extensions/TestSuiteFactory.h +++ b/include/cppunit/extensions/TestSuiteFactory.h @@ -10,7 +10,7 @@ namespace CppUnit { /*! \brief TestFactory for TestFixture that implements a static suite() method. * \see AutoRegisterSuite. */ - template<typename TestCaseType> + template<class TestCaseType> class TestSuiteFactory : public TestFactory { public: |
