1 #ifndef UNITTEST_TESTRESULTS_H 2 #define UNITTEST_TESTRESULTS_H 3 4 #include "HelperMacros.h" 5 6 namespace UnitTest { 7 8 class TestReporter; 9 class TestDetails; 10 11 class UNITTEST_LINKAGE TestResults 12 { 13 public: 14 explicit TestResults(TestReporter* reporter = 0); 15 16 void OnTestStart(TestDetails const& test); 17 void OnTestFailure(TestDetails const& test, char const* failure); 18 void OnTestFinish(TestDetails const& test, float secondsElapsed); 19 20 int GetTotalTestCount() const; 21 int GetFailedTestCount() const; 22 int GetFailureCount() const; 23 24 private: 25 TestReporter* m_testReporter; 26 int m_totalTestCount; 27 int m_failedTestCount; 28 int m_failureCount; 29 30 bool m_currentTestFailed; 31 32 TestResults(TestResults const&); 33 TestResults& operator =(TestResults const&); 34 }; 35 36 } 37 38 #endif 39