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