?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

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