blob: 714fbf687dbc28e025c185463cffd6725105aeda (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#ifndef CPPUNIT_TESTSUCCESSLISTENER_H
#define CPPUNIT_TESTSUCCESSLISTENER_H
#include <cppunit/SynchronizedObject.h>
#include <cppunit/TestListener.h>
CPPUNIT_NS_BEGIN
/*! \brief TestListener that checks if any test case failed.
* \ingroup TrackingTestExecution
*/
class CPPUNIT_API TestSuccessListener : public TestListener,
public SynchronizedObject
{
public:
/*! Constructs a TestSuccessListener object.
*/
TestSuccessListener( SynchronizationObject *syncObject = nullptr );
/// Destructor.
virtual ~TestSuccessListener() override;
virtual void reset();
void addFailure( const TestFailure &failure ) override;
/// Returns whether the entire test was successful or not.
virtual bool wasSuccessful() const;
private:
bool m_success;
};
CPPUNIT_NS_END
#endif // CPPUNIT_TESTSUCCESSLISTENER_H
|