summaryrefslogtreecommitdiff
path: root/src/cppunit/TestResult.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cppunit/TestResult.cpp')
-rw-r--r--src/cppunit/TestResult.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/cppunit/TestResult.cpp b/src/cppunit/TestResult.cpp
index aacb9a4..39ec208 100644
--- a/src/cppunit/TestResult.cpp
+++ b/src/cppunit/TestResult.cpp
@@ -1,3 +1,4 @@
+#include <cppunit/Test.h>
#include <cppunit/TestFailure.h>
#include <cppunit/TestListener.h>
#include <cppunit/TestResult.h>
@@ -150,4 +151,36 @@ TestResult::removeListener ( TestListener *listener )
m_listeners.end());
}
+
+void
+TestResult::runTest( Test *test )
+{
+ startTestRun( test );
+ test->run( this );
+ endTestRun( test );
+}
+
+
+void
+TestResult::startTestRun( Test *test )
+{
+ ExclusiveZone zone( m_syncObject );
+ for ( TestListeners::iterator it = m_listeners.begin();
+ it != m_listeners.end();
+ ++it )
+ (*it)->startTestRun( test, this );
+}
+
+
+void
+TestResult::endTestRun( Test *test )
+{
+ ExclusiveZone zone( m_syncObject );
+ for ( TestListeners::iterator it = m_listeners.begin();
+ it != m_listeners.end();
+ ++it )
+ (*it)->endTestRun( test, this );
+}
+
+
} // namespace CppUnit