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

#include <cpptest-output.h>

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

Public Member Functions

virtual ~Output ()
 
virtual void initialize (int tests)
 
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)
 

Protected Member Functions

 Output ()
 

Detailed Description

Test suite output handler.

Abstract base class for all suite output handlers. Derive from this class to create real output handlers that creates arbitrary complex output handlers.

All parts of testing is reported (test start/stop, suite start/stop, individual test start/stop, and assertments), thus giving maximum flexibility for derived classes.

Constructor & Destructor Documentation

◆ ~Output()

virtual Test::Output::~Output ( )
inlinevirtual

Empty destructor.

◆ Output()

Test::Output::Output ( )
inlineprotected

Empty constructor.

Member Function Documentation

◆ initialize()

virtual void Test::Output::initialize ( int  tests)
inlinevirtual

Called when testing is started.

Parameters
testsTotal number of tests in all suites.

Referenced by Test::Suite::run().

◆ finished()

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

Called when testing is finished.

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

Reimplemented in Test::TextOutput, and Test::CollectorOutput.

Referenced by Test::Suite::run().

◆ suite_start()

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

Called when a suite is entered.

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

Reimplemented in Test::TextOutput, and Test::CollectorOutput.

◆ suite_end()

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

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 in Test::TextOutput, and Test::CollectorOutput.

◆ test_start()

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

Called when a tests is executed.

Parameters
nameName of the test function.

Reimplemented in Test::CollectorOutput.

◆ test_end()

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

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 in Test::TextOutput, and Test::CollectorOutput.

◆ assertment()

virtual void Test::Output::assertment ( const Source s)
inlinevirtual

Called when an assertment is issued.

Parameters
sAssert point information.

Reimplemented in Test::CompilerOutput, Test::TextOutput, and Test::CollectorOutput.

Referenced by Test::Suite::assertment().


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