CppTest home page | CppTest project page |
Test suite output handler. More...
#include <cpptest-output.h>
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.
virtual Test::Output::~Output | ( | ) | [inline, virtual] |
Empty destructor.
Test::Output::Output | ( | ) | [inline, protected] |
Empty constructor.
virtual void Test::Output::initialize | ( | int | tests | ) | [inline, virtual] |
Called when testing is started.
tests | Total 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.
tests | Total number of tests in all suites. |
time | Total 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.
tests | Number of tests in this suite. |
name | Name 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.
tests | Number of tests in this suite. |
name | Name of the suite. |
time | Total 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.
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 | ||
) | [inline, virtual] |
Called when a test if finished, regardless if an assertment was issued.
name | Name of the test function. |
ok | True if the test was successful; false otherwise. |
time | Execution time. |
Reimplemented in Test::CollectorOutput, and Test::TextOutput.
virtual void Test::Output::assertment | ( | const Source & | s | ) | [inline, virtual] |
Called when an assertment is issued.
s | Assert point information. |
Reimplemented in Test::CollectorOutput, Test::CompilerOutput, and Test::TextOutput.
Referenced by Test::Suite::assertment().