CppTest home page | CppTest project page |
#include <cpptest-textoutput.h>
Text output handler that outputs to the a stream.
Test suite output handler that writes its information as text to a a stream. It it possible to select between two different operational modes that controls the detail level, see Mode.
Output mode.
Test::TextOutput::TextOutput | ( | Mode | mode, |
std::ostream & | stream = std::cout |
||
) |
Constructs a text output handler.
mode | Output mode. |
stream | Stream to output to. |
void Test::TextOutput::finished | ( | int | tests, |
const Time & | time | ||
) | [virtual] |
Called when testing is finished.
tests | Total number of tests in all suites. |
time | Total elapsed time for all tests. |
Reimplemented from Test::Output.
void Test::TextOutput::suite_start | ( | int | tests, |
const std::string & | name | ||
) | [virtual] |
Called when a suite is entered.
tests | Number of tests in this suite. |
name | Name of the suite. |
Reimplemented from Test::Output.
void Test::TextOutput::suite_end | ( | int | tests, |
const std::string & | name, | ||
const Time & | time | ||
) | [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 from Test::Output.
References Verbose.
void Test::TextOutput::test_end | ( | const std::string & | name, |
bool | ok, | ||
const Time & | time | ||
) | [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 from Test::Output.
void Test::TextOutput::assertment | ( | const Source & | s | ) | [virtual] |
Called when an assertment is issued.
s | Assert point information. |
Reimplemented from Test::Output.