?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. #ifndef UNITTEST_REQUIRED_CHECK_TEST_REPORTER_H
  2. #define UNITTEST_REQUIRED_CHECK_TEST_REPORTER_H
  3.  
  4. #include "HelperMacros.h"
  5. #include "ThrowingTestReporter.h"
  6.  
  7. namespace UnitTest {
  8.  
  9.    class TestResults;
  10.  
  11.    // This RAII class decorates the current TestReporter with
  12.    // a version that throws after reporting a failure.
  13.    class UNITTEST_LINKAGE RequiredCheckTestReporter
  14.    {
  15.    public:
  16.       explicit RequiredCheckTestReporter(TestResults& results);
  17.       ~RequiredCheckTestReporter();
  18.  
  19.       bool Next();
  20.  
  21.    private:
  22.       RequiredCheckTestReporter(RequiredCheckTestReporter const&);
  23.       RequiredCheckTestReporter& operator =(RequiredCheckTestReporter const&);
  24.  
  25.       TestResults& m_results;
  26.       TestReporter* m_originalTestReporter;
  27.       ThrowingTestReporter m_throwingReporter;
  28.       int m_continue;
  29.    };
  30. }
  31.  
  32. #endif
  33.  
  34.