?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. #ifndef UNITTEST_COMPOSITETESTREPORTER_H
  2. #define UNITTEST_COMPOSITETESTREPORTER_H
  3.  
  4. #include "TestReporter.h"
  5.  
  6. namespace UnitTest {
  7.  
  8.    class UNITTEST_LINKAGE CompositeTestReporter : public TestReporter
  9.    {
  10.    public:
  11.       CompositeTestReporter();
  12.  
  13.       int GetReporterCount() const;
  14.       bool AddReporter(TestReporter* reporter);
  15.       bool RemoveReporter(TestReporter* reporter);
  16.  
  17.       virtual void ReportTestStart(TestDetails const& test);
  18.       virtual void ReportFailure(TestDetails const& test, char const* failure);
  19.       virtual void ReportTestFinish(TestDetails const& test, float secondsElapsed);
  20.       virtual void ReportSummary(int totalTestCount, int failedTestCount, int failureCount, float secondsElapsed);
  21.  
  22.    private:
  23.       enum { kMaxReporters = 16 };
  24.       TestReporter* m_reporters[kMaxReporters];
  25.       int m_reporterCount;
  26.  
  27.       // revoked
  28.       CompositeTestReporter(const CompositeTestReporter&);
  29.       CompositeTestReporter& operator =(const CompositeTestReporter&);
  30.    };
  31.  
  32. }
  33.  
  34. #endif
  35.