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 {
00011 public:
00012     explicit TestResults(TestReporter* reporter = 0);
00013 
00014     void OnTestStart(TestDetails const& test);
00015     void OnTestFailure(TestDetails const& test, char const* failure);
00016     void OnTestFinish(TestDetails const& test, float secondsElapsed);
00017 
00018     int GetTotalTestCount() const;
00019     int GetFailedTestCount() const;
00020     int GetFailureCount() const;
00021 
00022 private:
00023     TestReporter* m_testReporter;
00024     int m_totalTestCount;
00025     int m_failedTestCount;
00026     int m_failureCount;
00027 
00028     bool m_currentTestFailed;
00029 
00030     TestResults(TestResults const&);
00031     TestResults& operator =(TestResults const&);
00032 };
00033 
00034 }
00035 
00036 #endif