TestResults.h 753 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef UNITTEST_TESTRESULTS_H
  2. #define UNITTEST_TESTRESULTS_H
  3. namespace UnitTest {
  4. class TestReporter;
  5. class TestDetails;
  6. class TestResults
  7. {
  8. public:
  9. explicit TestResults(TestReporter* reporter = 0);
  10. void OnTestStart(TestDetails const& test);
  11. void OnTestFailure(TestDetails const& test, char const* failure);
  12. void OnTestFinish(TestDetails const& test, float secondsElapsed);
  13. int GetTotalTestCount() const;
  14. int GetFailedTestCount() const;
  15. int GetFailureCount() const;
  16. private:
  17. TestReporter* m_testReporter;
  18. int m_totalTestCount;
  19. int m_failedTestCount;
  20. int m_failureCount;
  21. bool m_currentTestFailed;
  22. TestResults(TestResults const&);
  23. TestResults& operator =(TestResults const&);
  24. };
  25. }
  26. #endif