CppUnit - The Unit Testing Library

CppUnit project page | FAQ

TestSuccessListener.h
Go to the documentation of this file.
1#ifndef CPPUNIT_TESTSUCCESSLISTENER_H
2#define CPPUNIT_TESTSUCCESSLISTENER_H
3
4#include <cppunit/SynchronizedObject.h>
5#include <cppunit/TestListener.h>
6
7
8 CPPUNIT_NS_BEGIN
9
10
14 class CPPUNIT_API TestSuccessListener : public TestListener,
15 public SynchronizedObject
16{
17public:
20 TestSuccessListener( SynchronizationObject *syncObject = 0 );
21
23 virtual ~TestSuccessListener();
24
25 virtual void reset();
26
27 void addFailure( const TestFailure &failure );
28
30 virtual bool wasSuccessful() const;
31
32private:
33 bool m_success;
34};
35
36
37 CPPUNIT_NS_END
38
39#endif // CPPUNIT_TESTSUCCESSLISTENER_H
CPPUNIT_API
#define CPPUNIT_API
Definition CppUnitApi.h:27
CPPUNIT_NS_END
#define CPPUNIT_NS_END
Definition Portability.h:106
CPPUNIT_NS_BEGIN
#define CPPUNIT_NS_BEGIN
Definition Portability.h:105
SynchronizedObject.h
TestListener.h
SynchronizedObject::SynchronizationObject
Abstract synchronization object (mutex).
Definition SynchronizedObject.h:28
SynchronizedObject::SynchronizedObject
SynchronizedObject(SynchronizationObject *syncObject=0)
Definition SynchronizedObject.cpp:7
TestFailure
Record of a failed Test execution.
Definition TestFailure.h:25
TestListener
Listener for test progress and result.
Definition TestListener.h:95
TestListener::addFailure
virtual void addFailure(const TestFailure &)
Called when a failure occurs while running a test.
Definition TestListener.h:107
TestSuccessListener::m_success
bool m_success
Definition TestSuccessListener.h:33
TestSuccessListener::TestSuccessListener
TestSuccessListener(SynchronizationObject *syncObject=0)
Definition TestSuccessListener.cpp:7
TestSuccessListener::wasSuccessful
virtual bool wasSuccessful() const
Returns whether the entire test was successful or not.
Definition TestSuccessListener.cpp:36
TestSuccessListener::reset
virtual void reset()
Definition TestSuccessListener.cpp:20

| Send comments to: CppUnit Developers