00001 #ifndef UNITTEST_TESTRESULTS_H 00002 #define UNITTEST_TESTRESULTS_H 00003 00004 namespace UnitTest { 00005 00006 class TestReporter; 00007 class TestDetails; 00008 00009 class TestResults { 00010 public: 00011 explicit TestResults ( TestReporter* reporter = 0 ); 00012 00013 void OnTestStart ( TestDetails const& test ); 00014 void OnTestFailure ( TestDetails const& test, char const* failure ); 00015 void OnTestFinish ( TestDetails const& test, float secondsElapsed ); 00016 00017 int GetTotalTestCount() const; 00018 int GetFailedTestCount() const; 00019 int GetFailureCount() const; 00020 00021 private: 00022 TestReporter* m_testReporter; 00023 int m_totalTestCount; 00024 int m_failedTestCount; 00025 int m_failureCount; 00026 00027 bool m_currentTestFailed; 00028 00029 TestResults ( TestResults const& ); 00030 TestResults& operator = ( TestResults const& ); 00031 }; 00032 00033 } 00034 00035 #endif