CppTest home page CppTest project page

Public Member Functions | Protected Member Functions
Test::Output Class Reference

#include <cpptest-output.h>

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

List of all members.

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

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

Empty destructor.

Test::Output::Output ( )
inlineprotected

Empty constructor.


Member Function Documentation

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

Called when testing is started.

\param tests Total number of tests in all suites.

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

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

Called when testing is finished.

\param tests Total number of tests in all suites.
\param time  Total elapsed time for all tests.

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

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

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

Called when a suite is entered.

\param tests Number of tests in this suite.
\param name  Name of the suite.

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

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

Called when a suite is finished.

\param tests Number of tests in this suite.
\param name  Name of the suite.
\param time  Total elapsed time for all tests in this suite.

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

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

Called when a tests is executed.

\param name Name of the test function.

Reimplemented in Test::CollectorOutput.

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.

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

Called when an assertment is issued.

\param s Assert 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:

Supported by:

SourceForge Logo