1 #ifndef _beos_test_listener_h_ 2 #define _beos_test_listener_h_ 3 4 #include <cppunit/TestListener.h> 5 #include <SupportDefs.h> 6 7 namespace CppUnit { 8 class Test; 9 class TestFailure; 10 class Exception; 11 } 12 13 //! Handles printing of test information 14 /*! Receives notification of the beginning and end of each test, 15 and notification of all failures and errors. Prints out said 16 information in a standard format to standard output. 17 18 You should not need to explicitly use this class in any 19 of your tests. 20 */ 21 class CPPUNIT_API BTestListener : public CppUnit::TestListener { 22 public: 23 virtual void startTest( CppUnit::Test *test ); 24 virtual void addFailure( const CppUnit::TestFailure &failure ); 25 virtual void endTest( CppUnit::Test *test ); 26 protected: 27 void printTime(bigtime_t time); 28 bool fOkay; 29 bigtime_t startTime; 30 }; 31 32 #endif // _beos_test_listener_h_ 33