CppTest  Version 2.0.0
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Test::CollectorOutput Class Reference

#include <cpptest-collectoroutput.h>

Inheritance diagram for Test::CollectorOutput:
Test::Output Test::HtmlOutput

Public Member Functions

virtual void finished (int tests, const Time &time)
 
virtual void suite_start (int tests, const std::string &name)
 
virtual void suite_end (int tests, const std::string &name, const Time &time)
 
virtual void test_start (const std::string &name)
 
virtual void test_end (const std::string &name, bool ok, const Time &time)
 
virtual void assertment (const Source &s)
 
- Public Member Functions inherited from Test::Output
virtual ~Output ()
 
virtual void initialize (int tests)
 

Protected Types

typedef std::list< SourceSources
 
typedef std::vector< TestInfo > Tests
 
typedef std::list< SuiteInfo > Suites
 

Protected Member Functions

 CollectorOutput ()
 
- Protected Member Functions inherited from Test::Output
 Output ()
 

Protected Attributes

Suites _suites
 
int _total_errors
 
int _total_tests
 
Time _total_time
 

Detailed Description

Collector output.

Base class for output handlers that need to report status when all tests have executed.

Constructor & Destructor Documentation

◆ CollectorOutput()

Test::CollectorOutput::CollectorOutput ( )
protected

Constructs a collector object.

Member Function Documentation

◆ finished()

void Test::CollectorOutput::finished ( int  tests,
const Time time 
)
virtual

Called when testing is finished.

Parameters
testsTotal number of tests in all suites.
timeTotal elapsed time for all tests.

Reimplemented from Test::Output.

◆ suite_start()

void Test::CollectorOutput::suite_start ( int  tests,
const std::string &  name 
)
virtual

Called when a suite is entered.

Parameters
testsNumber of tests in this suite.
nameName of the suite.

Reimplemented from Test::Output.

◆ suite_end()

void Test::CollectorOutput::suite_end ( int  tests,
const std::string &  name,
const Time time 
)
virtual

Called when a suite is finished.

Parameters
testsNumber of tests in this suite.
nameName of the suite.
timeTotal elapsed time for all tests in this suite.

Reimplemented from Test::Output.

◆ test_start()

void Test::CollectorOutput::test_start ( const std::string &  name)
virtual

Called when a tests is executed.

Parameters
nameName of the test function.

Reimplemented from Test::Output.

◆ test_end()

void Test::CollectorOutput::test_end ( const std::string &  name,
bool  ok,
const Time time 
)
virtual

Called when a test if finished, regardless if an assertment was issued.

Parameters
nameName of the test function.
okTrue if the test was successful; false otherwise.
timeExecution time.

Reimplemented from Test::Output.

◆ assertment()

void Test::CollectorOutput::assertment ( const Source s)
virtual

Called when an assertment is issued.

Parameters
sAssert point information.

Reimplemented from Test::Output.


The documentation for this class was generated from the following files: