Imported Upstream version 2.81
[platform/upstream/libbullet.git] / UnitTests / cppunit / src / cppunit / TestSuccessListener.cpp
1 #include <cppunit/TestSuccessListener.h>
2
3
4 CPPUNIT_NS_BEGIN
5
6
7 TestSuccessListener::TestSuccessListener( SynchronizationObject *syncObject )
8     : SynchronizedObject( syncObject )
9     , m_success( true )
10 {
11 }
12
13
14 TestSuccessListener::~TestSuccessListener()
15 {
16 }
17
18
19 void 
20 TestSuccessListener::reset()
21 {
22   ExclusiveZone zone( m_syncObject );
23   m_success = true;
24 }
25
26
27 void 
28 TestSuccessListener::addFailure( const TestFailure & )
29 {
30   ExclusiveZone zone( m_syncObject );
31   m_success = false;
32 }
33
34
35 bool 
36 TestSuccessListener::wasSuccessful() const
37 {
38   ExclusiveZone zone( m_syncObject );
39   return m_success;
40 }
41
42
43 CPPUNIT_NS_END
44