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.cpp28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/cppunit/TestResult.cpp b/src/cppunit/TestResult.cpp
index d5644a4..aacb9a4 100644
--- a/src/cppunit/TestResult.cpp
+++ b/src/cppunit/TestResult.cpp
@@ -66,7 +66,7 @@ TestResult::addFailure( const TestFailure &failure )
}
-/// Informs the result that a test will be started.
+/// Informs TestListener that a test will be started.
void
TestResult::startTest( Test *test )
{
@@ -78,7 +78,7 @@ TestResult::startTest( Test *test )
}
-/// Informs the result that a test was completed.
+/// Informs TestListener that a test was completed.
void
TestResult::endTest( Test *test )
{
@@ -90,6 +90,30 @@ TestResult::endTest( Test *test )
}
+/// Informs TestListener that a test suite will be started.
+void
+TestResult::startSuite( Test *test )
+{
+ ExclusiveZone zone( m_syncObject );
+ for ( TestListeners::iterator it = m_listeners.begin();
+ it != m_listeners.end();
+ ++it )
+ (*it)->startSuite( test );
+}
+
+
+/// Informs TestListener that a test suite was completed.
+void
+TestResult::endSuite( Test *test )
+{
+ ExclusiveZone zone( m_syncObject );
+ for ( TestListeners::iterator it = m_listeners.begin();
+ it != m_listeners.end();
+ ++it )
+ (*it)->endSuite( test );
+}
+
+
/// Returns whether testing should be stopped
bool
TestResult::shouldStop() const