File: RequiredCheckTestReporter.cpp

package info (click to toggle)
etlcpp 20.42.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 21,152 kB
  • sloc: cpp: 296,677; ansic: 10,807; sh: 1,418; asm: 301; python: 281; makefile: 16
file content (26 lines) | stat: -rw-r--r-- 624 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "RequiredCheckTestReporter.h"

#include "CurrentTest.h"
#include "TestResults.h"

namespace UnitTest {

   RequiredCheckTestReporter::RequiredCheckTestReporter(TestResults& results)
      : m_results(results)
      , m_originalTestReporter(results.m_testReporter)
      , m_throwingReporter(results.m_testReporter)
      , m_continue(0)
   {
      m_results.m_testReporter = &m_throwingReporter;
   }

   RequiredCheckTestReporter::~RequiredCheckTestReporter()
   {
      m_results.m_testReporter = m_originalTestReporter;
   }

   bool RequiredCheckTestReporter::Next()
   {
      return m_continue++ == 0;
   }
}