summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Lepilleur <gaiacrtn@free.fr>2002-08-29 21:26:01 +0000
committerBaptiste Lepilleur <gaiacrtn@free.fr>2002-08-29 21:26:01 +0000
commit938c5ebcaed57a6652ae3f189bac55a1489ac478 (patch)
tree5e1627ef2ff8b085bcb9f04a4cadf7a7a05bbd45
parent93d20fcb3bfbfa1d20e435218b60e6ed768f57b7 (diff)
downloadcppunit-938c5ebcaed57a6652ae3f189bac55a1489ac478.tar.gz
Include/cppunit/TestResult.
include/cppunit/TestResult.h: * src/cppunit/TestResult.cpp: fixed shouldStop() bug.
-rw-r--r--ChangeLog5
-rw-r--r--NEWS2
-rw-r--r--examples/examples.optbin142848 -> 144896 bytes
-rw-r--r--include/cppunit/TestResult.h4
-rw-r--r--src/cppunit/TestResult.cpp9
5 files changed, 18 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5954d40..b3fe227 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2002-08-29 Baptiste Lepilleur <gaiacrtn@free.fr>
+ * include/cppunit/TestResult.h:
+ * src/cppunit/TestResult.cpp: fixed shouldStop() bug.
+
+2002-08-29 Baptiste Lepilleur <gaiacrtn@free.fr>
+
* include/cppunit/CompilerOutputter.h:
* include/cppunit/Exception.h:
* include/cppunit/Protector.h:
diff --git a/NEWS b/NEWS
index 138ed38..b848a54 100644
--- a/NEWS
+++ b/NEWS
@@ -104,8 +104,6 @@
static void aMethodName( TestSuiteBuilderContextType &context ).
You can replace the 3 previous parameters by context. (See
documentation for further detail).
- - TestResult: removed reset(). Leftover from the split with
- TestResultCollector.
diff --git a/examples/examples.opt b/examples/examples.opt
index f14c0a2..89e3e20 100644
--- a/examples/examples.opt
+++ b/examples/examples.opt
Binary files differ
diff --git a/include/cppunit/TestResult.h b/include/cppunit/TestResult.h
index ff3243b..4653102 100644
--- a/include/cppunit/TestResult.h
+++ b/include/cppunit/TestResult.h
@@ -57,7 +57,11 @@ public:
virtual ~TestResult();
virtual void addListener( TestListener *listener );
+
virtual void removeListener( TestListener *listener );
+
+ /// Resets the stop flag.
+ virtual void reset();
/// Stop testing
virtual void stop();
diff --git a/src/cppunit/TestResult.cpp b/src/cppunit/TestResult.cpp
index a7bccc3..90658ab 100644
--- a/src/cppunit/TestResult.cpp
+++ b/src/cppunit/TestResult.cpp
@@ -13,6 +13,7 @@ CPPUNIT_NS_BEGIN
TestResult::TestResult( SynchronizationObject *syncObject )
: SynchronizedObject( syncObject )
, m_protectorChain( new ProtectorChain() )
+ , m_stop( false )
{
m_protectorChain->push( new DefaultProtector() );
}
@@ -25,6 +26,14 @@ TestResult::~TestResult()
void
+TestResult::reset()
+{
+ ExclusiveZone zone( m_syncObject );
+ m_stop = false;
+}
+
+
+void
TestResult::addError( Test *test,
Exception *e )
{