summaryrefslogtreecommitdiff
path: root/testshl2/inc/testshl/result/TestSucessListener.h
blob: 3eb53b9fc13f743475773015e6c7172b8eabbbed (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
40
#ifndef CPPUNIT_TESTSUCESSLISTENER_H
#define CPPUNIT_TESTSUCESSLISTENER_H

#include <testshl/result/SynchronizedObject.h>
#include <testshl/result/TestListener.h>


namespace CppUnit
{

/*! \brief TestListener that checks if any test case failed.
 * \ingroup TrackingTestExecution
 */
class CPPUNIT_API TestSucessListener : public TestListener,
                                       public SynchronizedObject
{
public:
  /*! Constructs a TestSucessListener object.
   */
  TestSucessListener( SynchronizationObject *syncObject = 0 );

  /// Destructor.
  virtual ~TestSucessListener();

  virtual void reset();

  void addFailure( const TestFailure &failure );

  /// Returns whether the entire test was successful or not.
  virtual bool wasSuccessful() const;

private:
  bool m_sucess;
};


} //  namespace CppUnit


#endif  // CPPUNIT_TESTSUCESSLISTENER_H