~ubuntu-branches/ubuntu/wily/psi/wily-proposed

« back to all changes in this revision

Viewing changes to third-party/cppunit/cppunit/include/cppunit/TestSuccessListener.h

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2008-08-28 18:46:52 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080828184652-iiik12dl91nq7cdi
Tags: 0.12-2
Uploading to unstable (Closes: Bug#494352)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
11
/*! \brief TestListener that checks if any test case failed.
 
12
 * \ingroup TrackingTestExecution
 
13
 */
 
14
class CPPUNIT_API TestSuccessListener : public TestListener,
 
15
                                        public SynchronizedObject
 
16
{
 
17
public:
 
18
  /*! Constructs a TestSuccessListener object.
 
19
   */
 
20
  TestSuccessListener( SynchronizationObject *syncObject = 0 );
 
21
 
 
22
  /// Destructor.
 
23
  virtual ~TestSuccessListener();
 
24
 
 
25
  virtual void reset();
 
26
 
 
27
  void addFailure( const TestFailure &failure );
 
28
 
 
29
  /// Returns whether the entire test was successful or not.
 
30
  virtual bool wasSuccessful() const;
 
31
 
 
32
private:
 
33
  bool m_success;
 
34
};
 
35
 
 
36
 
 
37
CPPUNIT_NS_END
 
38
 
 
39
#endif  // CPPUNIT_TESTSUCCESSLISTENER_H