A Reporter that sends results directly to an output stream.
More...
#include <reporter_stream.h>
|
| ReporterStream (std::ostream &strm=std::cout) |
|
void | SetTrace (bool on_off) |
| Controls test tracing feature.
|
|
virtual void | Clear () |
| Reset all statistics.
|
|
|
void | SuiteStart (const TestSuite &suite) override |
| If tracing is enabled, show a suite start message.
|
|
void | TestStart (const Test &test) override |
| If tracing is enabled, show a test start message.
|
|
void | TestFinish (const Test &test) override |
| If tracing is enabled, show a test finish message.
|
|
int | SuiteFinish (const TestSuite &suite) override |
| If tracing is enabled, show a suite finish message.
|
|
void | ReportFailure (const Failure &failure) override |
|
int | Summary () override |
|
|
std::ostream & | out |
|
int | suite_test_count |
| number of tests in suite
|
|
int | suite_failed_count |
| number of failed tests in suite
|
|
int | suite_failures_count |
| number of failures in suite
|
|
int | suite_time_msec |
| total suite running time in milliseconds
|
|
int | total_test_count |
| total number of tests
|
|
int | total_failed_count |
| total number of failed tests
|
|
int | total_failures_count |
| total number of failures
|
|
int | total_time_msec |
| total running time in milliseconds
|
|
int | suites_count |
| number of suites ran
|
|
bool | trace |
| true if tracing is enabled
|
|
A Reporter that sends results directly to an output stream.
◆ ReporterStream()
UnitTest::ReporterStream::ReporterStream |
( |
std::ostream & | strm = std::cout | ) |
|
|
inline |
Constructor for a stream reporter.
- Parameters
-
◆ ReportFailure()
void UnitTest::ReporterStream::ReportFailure |
( |
const Failure & | failure | ) |
|
|
inlineoverrideprotectedvirtual |
Output a failure message. If a test is in progress (the normal case) the message includes the name of the test and suite.
- Parameters
-
failure | - the failure information (filename, line number and message) |
Reimplemented from UnitTest::Reporter.
◆ SuiteFinish()
int UnitTest::ReporterStream::SuiteFinish |
( |
const TestSuite & | suite | ) |
|
|
inlineoverrideprotectedvirtual |
If tracing is enabled, show a suite finish message.
Reimplemented from UnitTest::Reporter.
◆ SuiteStart()
void UnitTest::ReporterStream::SuiteStart |
( |
const TestSuite & | suite | ) |
|
|
inlineoverrideprotectedvirtual |
◆ Summary()
int UnitTest::ReporterStream::Summary |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
Prints a test run summary including number of tests, number of failures, running time, etc.
Reimplemented from UnitTest::Reporter.
◆ TestFinish()
void UnitTest::ReporterStream::TestFinish |
( |
const Test & | test | ) |
|
|
inlineoverrideprotectedvirtual |
◆ TestStart()
void UnitTest::ReporterStream::TestStart |
( |
const Test & | test | ) |
|
|
inlineoverrideprotectedvirtual |
The documentation for this class was generated from the following file: