diff options
| author | Steve M. Robbins <smr@sumost.ca> | 2001-07-15 03:18:06 +0000 |
|---|---|---|
| committer | Steve M. Robbins <smr@sumost.ca> | 2001-07-15 03:18:06 +0000 |
| commit | 08b4a5c444044db09dc5c668390e9f40663210ff (patch) | |
| tree | f94c3f33864a238e3edc29c6fc92ebff748e82fa /include/cppunit/extensions | |
| parent | 8cdfc19f2213bf1de4aee4bc5e799af49b6608d0 (diff) | |
| download | cppunit-08b4a5c444044db09dc5c668390e9f40663210ff.tar.gz | |
Added documentation.
Diffstat (limited to 'include/cppunit/extensions')
| -rw-r--r-- | include/cppunit/extensions/RepeatedTest.h | 7 | ||||
| -rw-r--r-- | include/cppunit/extensions/TestDecorator.h | 22 |
2 files changed, 15 insertions, 14 deletions
diff --git a/include/cppunit/extensions/RepeatedTest.h b/include/cppunit/extensions/RepeatedTest.h index 7a68e88..b28deeb 100644 --- a/include/cppunit/extensions/RepeatedTest.h +++ b/include/cppunit/extensions/RepeatedTest.h @@ -9,10 +9,9 @@ class Test; class TestResult; -/* - * A decorator that runs a test repeatedly. - * Does not assume ownership of the test it decorates +/*! \brief Decorator that runs a test repeatedly. * + * Does not assume ownership of the test it decorates */ class RepeatedTest : public TestDecorator { @@ -22,9 +21,9 @@ public: TestDecorator( test ), m_timesRepeat(timesRepeat) {} + void run( TestResult *result ); int countTestCases(); std::string toString(); - void run( TestResult *result ); private: RepeatedTest( const RepeatedTest & ); diff --git a/include/cppunit/extensions/TestDecorator.h b/include/cppunit/extensions/TestDecorator.h index caf08a3..2a6b9d7 100644 --- a/include/cppunit/extensions/TestDecorator.h +++ b/include/cppunit/extensions/TestDecorator.h @@ -7,30 +7,32 @@ namespace CppUnit { class TestResult; -/* - * A Decorator for Tests + +/*! \brief Decorator for Tests. * - * Does not assume ownership of the test it decorates + * TestDecorator provides an alternate means to extend functionality + * of a test class without subclassing the test. Instead, one can + * subclass the decorater and use it to wrap the test class. * + * Does not assume ownership of the test it decorates */ - class TestDecorator : public Test { public: - TestDecorator (Test *test); - ~TestDecorator (); + TestDecorator (Test *test); + ~TestDecorator (); - int countTestCases () const; void run (TestResult *result); - std::string toString () const; + int countTestCases () const; std::string getName () const; + std::string toString () const; protected: Test *m_test; private: - TestDecorator( const TestDecorator &); - void operator =( const TestDecorator & ); + TestDecorator( const TestDecorator &); + void operator =( const TestDecorator & ); }; |
