summaryrefslogtreecommitdiff
path: root/include/cppunit/TextTestRunner.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/cppunit/TextTestRunner.h')
-rw-r--r--include/cppunit/TextTestRunner.h28
1 files changed, 17 insertions, 11 deletions
diff --git a/include/cppunit/TextTestRunner.h b/include/cppunit/TextTestRunner.h
index 5c5180d..e44f68d 100644
--- a/include/cppunit/TextTestRunner.h
+++ b/include/cppunit/TextTestRunner.h
@@ -8,6 +8,7 @@ namespace CppUnit {
class Test;
class TestSuite;
+class TextTestResult;
/**
* A text mode test runner.
@@ -30,21 +31,26 @@ class TestSuite;
class TextTestRunner
{
public:
- TextTestRunner();
- virtual ~TextTestRunner();
+ TextTestRunner( TextTestResult *result =0 );
+ virtual ~TextTestRunner();
- bool run( std::string testName ="",
- bool wait = false );
+ bool run( std::string testName ="",
+ bool wait = false,
+ bool printResult = true );
- void addTest( Test *test );
+ void addTest( Test *test );
-protected:
- bool runTest( Test *test );
- bool runTestByName( std::string testName );
- void wait( bool doWait );
+ TextTestResult *result();
- Test *findTestByName( std::string name ) const;
- TestSuite *m_suite;
+protected:
+ bool runTest( Test *test );
+ bool runTestByName( std::string testName );
+ void wait( bool doWait );
+ void printResult( bool doPrintResult );
+
+ Test *findTestByName( std::string name ) const;
+ TestSuite *m_suite;
+ TextTestResult *m_result;
};
} // namespace CppUnit