CppTest home page CppTest project page

Public Member Functions | Protected Member Functions

Test::Output Class Reference

Test suite output handler. More...

#include <cpptest-output.h>

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

List of all members.

Public Member Functions

Protected Member Functions


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

virtual Test::Output::~Output ( ) [inline, virtual]

Empty destructor.

Test::Output::Output ( ) [inline, protected]

Empty constructor.


Member Function Documentation

virtual void Test::Output::initialize ( int  tests) [inline, virtual]

Called when testing is started.

Parameters:
testsTotal number of tests in all suites.

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

virtual void Test::Output::finished ( int  tests,
const Time time 
) [inline, virtual]

Called when testing is finished.

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

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

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

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

Called when a suite is entered.

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

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

virtual void Test::Output::suite_end ( int  tests,
const std::string &  name,
const Time time 
) [inline, 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 in Test::CollectorOutput, and Test::TextOutput.

void Test::CollectorOutput::test_start ( const std::string &  name) [inline, virtual]

Called when a tests is executed.

Parameters:
nameName of the test function.

Reimplemented in Test::CollectorOutput.

virtual void Test::Output::test_end ( const std::string &  name,
bool  ok,
const Time time 
) [inline, 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 in Test::CollectorOutput, and Test::TextOutput.

virtual void Test::Output::assertment ( const Source s) [inline, virtual]

Called when an assertment is issued.

Parameters:
sAssert point information.

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

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


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

Supported by:

SourceForge Logo