summaryrefslogtreecommitdiff
path: root/include/cppunit/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'include/cppunit/extensions')
-rw-r--r--include/cppunit/extensions/RepeatedTest.h22
-rw-r--r--include/cppunit/extensions/TestDecorator.h59
2 files changed, 46 insertions, 35 deletions
diff --git a/include/cppunit/extensions/RepeatedTest.h b/include/cppunit/extensions/RepeatedTest.h
index 067fd20..5db7dc2 100644
--- a/include/cppunit/extensions/RepeatedTest.h
+++ b/include/cppunit/extensions/RepeatedTest.h
@@ -17,20 +17,22 @@ class TestResult;
class CPPUNIT_API RepeatedTest : public TestDecorator
{
public:
- RepeatedTest( Test *test,
- int timesRepeat ) :
- TestDecorator( test ),
- m_timesRepeat(timesRepeat) {}
+ RepeatedTest( Test *test,
+ int timesRepeat ) :
+ TestDecorator( test ),
+ m_timesRepeat(timesRepeat)
+ {
+ }
- void run( TestResult *result );
- int countTestCases() const;
- std::string toString() const;
+ void run( TestResult *result );
+
+ int countTestCases() const;
private:
- RepeatedTest( const RepeatedTest & );
- void operator=( const RepeatedTest & );
+ RepeatedTest( const RepeatedTest & );
+ void operator=( const RepeatedTest & );
- const int m_timesRepeat;
+ const int m_timesRepeat;
};
diff --git a/include/cppunit/extensions/TestDecorator.h b/include/cppunit/extensions/TestDecorator.h
index c3dc343..9777540 100644
--- a/include/cppunit/extensions/TestDecorator.h
+++ b/include/cppunit/extensions/TestDecorator.h
@@ -2,7 +2,7 @@
#define CPPUNIT_EXTENSIONS_TESTDECORATOR_H
#include <cppunit/Portability.h>
-#include <cppunit/Test.h>
+#include <cppunit/TestLeaf.h>
namespace CppUnit {
@@ -17,48 +17,57 @@ class TestResult;
*
* Does not assume ownership of the test it decorates
*/
-class CPPUNIT_API TestDecorator : public Test
+class CPPUNIT_API TestDecorator : public TestLeaf
{
public:
- TestDecorator (Test *test);
- ~TestDecorator ();
+ TestDecorator( Test *test );
+ ~TestDecorator();
- void run (TestResult *result);
- int countTestCases () const;
- std::string getName () const;
- std::string toString () const;
+ int countTestCases() const;
+ std::string getName() const;
+ void run( TestResult *result );
protected:
- Test *m_test;
+ Test *m_test;
private:
- TestDecorator( const TestDecorator &);
- void operator =( const TestDecorator & );
+ TestDecorator( const TestDecorator &);
+ void operator =( const TestDecorator & );
};
-inline TestDecorator::TestDecorator (Test *test)
-{ m_test = test; }
+inline
+TestDecorator::TestDecorator( Test *test )
+{
+ m_test = test;
+}
-inline TestDecorator::~TestDecorator ()
-{}
-
-
-inline int TestDecorator::countTestCases () const
-{ return m_test->countTestCases (); }
+inline
+TestDecorator::~TestDecorator()
+{
+}
-inline void TestDecorator::run (TestResult *result)
-{ m_test->run (result); }
+inline int
+TestDecorator::countTestCases() const
+{
+ return m_test->countTestCases();
+}
-inline std::string TestDecorator::toString () const
-{ return m_test->toString (); }
+inline void
+TestDecorator::run( TestResult *result )
+{
+ m_test->run(result);
+}
-inline std::string TestDecorator::getName () const
-{ return m_test->getName(); }
+inline std::string
+TestDecorator::getName() const
+{
+ return m_test->getName();
+}
} // namespace CppUnit