1 #ifndef CPPUNIT_TESTSUCESSLISTENER_H 2 #define CPPUNIT_TESTSUCESSLISTENER_H 3 4 #include <cppunit/SynchronizedObject.h> 5 #include <cppunit/TestListener.h> 6 7 8 namespace CppUnit 9 { 10 11 /*! \brief TestListener that checks if any test case failed. 12 * \ingroup TrackingTestExecution 13 */ 14 class CPPUNIT_API TestSucessListener : public TestListener, 15 public SynchronizedObject 16 { 17 public: 18 /*! Constructs a TestSucessListener object. 19 */ 20 TestSucessListener( SynchronizationObject *syncObject = 0 ); 21 22 /// Destructor. 23 virtual ~TestSucessListener(); 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_sucess; 34 }; 35 36 37 } // namespace CppUnit 38 39 40 #endif // CPPUNIT_TESTSUCESSLISTENER_H 41