#include <unittest_decls.h>
Inheritance diagram for ForwardGatherer:
Public Member Functions | |
std::auto_ptr< BaseGatherer > | clone () |
Create something that acts like this gatherer and can be deleted. | |
ForwardGatherer (BaseGatherer &g, const std::string &p) | |
Constructor. | |
void | succeed (const std::string &n) |
Success reporting method. | |
void | fail (const std::string &n, const std::string &r) |
Failure reporting method. | |
void | pending (int n) |
Tells the gatherer that there are more reports to come. | |
BaseGatherer & | forwardto () |
Returns the gatherer that actually receives the result. | |
const std::string & | prefixed () const |
Returns what this gatherer prepends to the test name before forwarding the report. |
ForwardGatherer::ForwardGatherer | ( | BaseGatherer & | g, | |
const std::string & | p | |||
) | [inline] |
Constructor.
g | is the gatherer to forward reports to | |
p | is the string to be prepended to test names |
std::auto_ptr< BaseGatherer > ForwardGatherer::clone | ( | ) | [virtual] |
Create something that acts like this gatherer and can be deleted.
Implements BaseGatherer.
void ForwardGatherer::succeed | ( | const std::string & | n | ) | [virtual] |
Success reporting method.
n | is the name of the test that succeeded |
Implements BaseGatherer.
void ForwardGatherer::fail | ( | const std::string & | n, | |
const std::string & | r | |||
) | [virtual] |
Failure reporting method.
n | is the name of the test that failed | |
r | is a reason for why the test failed |
Implements BaseGatherer.
void ForwardGatherer::pending | ( | int | n | ) | [virtual] |
Tells the gatherer that there are more reports to come.
n | is the number of reports that are to arrive, may be negative. |
Reimplemented from BaseGatherer.
BaseGatherer & ForwardGatherer::forwardto | ( | ) | [virtual] |
Returns the gatherer that actually receives the result.
This exists in order to avoid endless chains of ForwardGatherers.
Reimplemented from BaseGatherer.
const std::string & ForwardGatherer::prefixed | ( | ) | const [virtual] |
Returns what this gatherer prepends to the test name before forwarding the report.
Reimplemented from BaseGatherer.