BaseGatherer Class Reference

A gatherer collects test results. More...

#include <unittest_decls.h>

Inheritance diagram for BaseGatherer:

ForwardGatherer Gatherer List of all members.

Public Member Functions

virtual std::auto_ptr< BaseGathererclone ()=0
 Create something that acts like this gatherer and can be deleted.
virtual void succeed (const std::string &n)=0
 Success reporting method.
virtual void fail (const std::string &n, const std::string &r)=0
 Failure reporting method.
virtual void pending (int n=1)
 Tells the gatherer that there are more reports to come.
virtual BaseGathererforwardto ()
 Returns the gatherer that actually receives the result.
virtual const std::string & prefixed () const
 Returns what this gatherer prepends to the test name before forwarding the report.

Detailed Description

A gatherer collects test results.


Member Function Documentation

virtual std::auto_ptr<BaseGatherer> BaseGatherer::clone (  )  [pure virtual]

Create something that acts like this gatherer and can be deleted.

Returns:
a deletable BaseGatherer

Implemented in ForwardGatherer, and Gatherer.

virtual void BaseGatherer::succeed ( const std::string &  n  )  [pure virtual]

Success reporting method.

Parameters:
n is the name of the test that succeeded

Implemented in ForwardGatherer, and Gatherer.

virtual void BaseGatherer::fail ( const std::string &  n,
const std::string &  r 
) [pure virtual]

Failure reporting method.

Parameters:
n is the name of the test that failed
r is a reason for why the test failed

Implemented in ForwardGatherer, and Gatherer.

void BaseGatherer::pending ( int  n = 1  )  [virtual]

Tells the gatherer that there are more reports to come.

Parameters:
n is the number of reports that are to arrive, may be negative.

Reimplemented in ForwardGatherer.

BaseGatherer & BaseGatherer::forwardto (  )  [virtual]

Returns the gatherer that actually receives the result.

This exists in order to avoid endless chains of ForwardGatherers.

Returns:
the gatherer that this gatherer forwards results to or this if this gatherer does not forward anything

Reimplemented in ForwardGatherer.

const std::string & BaseGatherer::prefixed (  )  const [virtual]

Returns what this gatherer prepends to the test name before forwarding the report.

Returns:
the prefix or an empty string if this gatherer does not forward anything

Reimplemented in ForwardGatherer.


The documentation for this class was generated from the following files:
Generated on Sat Feb 7 01:26:51 2009 by  doxygen 1.5.1