CppUnit project page FAQ CppUnit home page

TextTestProgressListener.h
Go to the documentation of this file.
1 #ifndef CPPUNIT_TEXTTESTPROGRESSLISTENER_H
2 #define CPPUNIT_TEXTTESTPROGRESSLISTENER_H
3 
4 #include <cppunit/TestListener.h>
5 #include <memory>
6 #include <stdint.h>
7 
8 
10 
11 
17 {
18 public:
19  static unsigned long ignoredTests;
20 
24 
26  virtual ~TextTestProgressListener();
27 
28  void startTest( Test *test );
29 
30  void addFailure( const TestFailure &failure );
31 
32  void endTestRun( Test *test,
33  TestResult *eventManager );
34 
35  struct TestStartHook {
36  virtual ~TestStartHook() {}
37  virtual void startedTest(const std::string& testName) = 0;
38  virtual void stoppedTest() = 0;
39  };
40  static bool verboseProgress;
41  static std::unique_ptr<TestStartHook> startHook;
42  static uint64_t startTime;
43  static uint32_t nameLen;
44 
45 private:
48 
50  void operator =( const TextTestProgressListener &copy );
51 
52 private:
53 };
54 
55 
57 
58 #endif // CPPUNIT_TEXTTESTPROGRESSLISTENER_H
static bool verboseProgress
Definition: TextTestProgressListener.h:40
TestListener that show the status of each TestCase test result.
Definition: TextTestProgressListener.h:16
Definition: TextTestProgressListener.h:35
Manages TestListener.A single instance of this class is used when running the test. It is usually created by the test runner (TestRunner).
Definition: TestResult.h:51
virtual void endTestRun(Test *, TestResult *)
Called by a TestRunner after running the test.
Definition: TestListener.h:139
virtual void addFailure(const TestFailure &)
Called when a failure occurs while running a test.
Definition: TestListener.h:107
virtual ~TestStartHook()
Definition: TextTestProgressListener.h:36
Base class for all test objects.All test objects should be a subclass of Test. Some test objects...
Definition: Test.h:26
Record of a failed Test execution.A TestFailure collects a failed test together with the caught excep...
Definition: TestFailure.h:24
#define CPPUNIT_NS_END
Definition: Portability.h:120
#define CPPUNIT_NS_BEGIN
Definition: Portability.h:119
static unsigned long ignoredTests
Definition: TextTestProgressListener.h:19
static uint32_t nameLen
Definition: TextTestProgressListener.h:43
static uint64_t startTime
Definition: TextTestProgressListener.h:42
Listener for test progress and result.Implementing the Observer pattern a TestListener may be registe...
Definition: TestListener.h:94
virtual void startTest(Test *)
Called when just before a TestCase is run.
Definition: TestListener.h:100
static std::unique_ptr< TestStartHook > startHook
Definition: TextTestProgressListener.h:41
#define CPPUNIT_API
Definition: CppUnitApi.h:27

SourceForge Logo hosts this site. Send comments to:
CppUnit Developers