summaryrefslogtreecommitdiff
path: root/include/cppunit/extensions/TestSetUp.h
diff options
context:
space:
mode:
authorBaptiste Lepilleur <gaiacrtn@free.fr>2001-06-11 19:00:08 +0000
committerBaptiste Lepilleur <gaiacrtn@free.fr>2001-06-11 19:00:08 +0000
commite38eb47e23d6106c32ee136351b0080313339270 (patch)
tree7989d9f5435ed23b30ef45b9f3cd40f00cafc391 /include/cppunit/extensions/TestSetUp.h
parentc7a4dccd9f1b1fadcd47afe482c8a8ff9e05ea8f (diff)
downloadcppunit-e38eb47e23d6106c32ee136351b0080313339270.tar.gz
Include/cppunit/extensions/HelperMacros.
include/cppunit/extensions/HelperMacros.h: static method suite() implemented by CPPUNIT_TEST_SUITE_END macro now returns a TestSuite instead of a Test. * include/cppunit/extensions/RepeatedTest.h: corrected countTestCases, operator = declaration. * include/cppunit/extensions/TestDecorator.h: removed const from run() method. Did not match run() declaration of Test class. * include/cppunit/extensions/TestFactory.h: fixed a comment. * include/cppunit/extensions/TestSetup.h: corrected run() method declaration. Methods setUp() and tearDown() were not declared virtual. * include/cppunit/extensions/TestSuiteBuilder.h: added a method addTestCaller() which take a pointer on a fixture.
Diffstat (limited to 'include/cppunit/extensions/TestSetUp.h')
-rw-r--r--include/cppunit/extensions/TestSetUp.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/include/cppunit/extensions/TestSetUp.h b/include/cppunit/extensions/TestSetUp.h
index 34f4603..c97402c 100644
--- a/include/cppunit/extensions/TestSetUp.h
+++ b/include/cppunit/extensions/TestSetUp.h
@@ -12,12 +12,13 @@ class TestResult;
class TestSetUp : public TestDecorator
{
public:
- TestSetUp (Test *test) : TestDecorator (test) {}
- run (TestResult *result);
+ TestSetUp (Test *test) : TestDecorator (test) {}
+
+ void run (TestResult *result);
protected:
- void setUp () {}
- void tearDown () {}
+ virtual void setUp () {}
+ virtual void tearDown () {}
private:
TestSetUp( const TestSetUp & );
@@ -25,8 +26,13 @@ private:
};
-inline TestSetup::run (TestResult *result)
-{ setUp (); TestDecorator::run (result); tearDown (); }
+inline void
+TestSetUp::run (TestResult *result)
+{
+ setUp ();
+ TestDecorator::run (result);
+ tearDown ();
+}
} // namespace CppUnit