tut::test_runner Class Reference

Test runner. More...

#include <tut.h>

Collaboration diagram for tut::test_runner:
[legend]

List of all members.

Public Member Functions

 test_runner ()
 Constructor.
void register_group (const std::string &name, group_base *gr)
 Stores another group for getting by name.
void set_callback (callback *cb)
 Stores callback object.
callbackget_callback () const
 Returns callback object.
const groupnames list_groups () const
 Returns list of known test groups.
void run_tests () const
 Runs all tests in all groups.
void run_tests (const std::string &group_name) const
 Runs all tests in specified group.
test_result run_test (const std::string &group_name, int n) const
 Runs one test in specified group.

Protected Types

typedef std::map< std::string,
group_base * > 
groups
typedef groups::iterator iterator
typedef groups::const_iterator const_iterator

Protected Attributes

groups groups_
callback default_callback_
callbackcallback_


Detailed Description

Test runner.

Member Typedef Documentation

typedef groups::const_iterator tut::test_runner::const_iterator [protected]

typedef std::map<std::string,group_base*> tut::test_runner::groups [protected]

typedef groups::iterator tut::test_runner::iterator [protected]


Constructor & Destructor Documentation

tut::test_runner::test_runner (  )  [inline]

Constructor.


Member Function Documentation

callback& tut::test_runner::get_callback (  )  const [inline]

Returns callback object.

References callback_.

Referenced by tut::restartable_wrapper::get_callback().

const groupnames tut::test_runner::list_groups (  )  const [inline]

Returns list of known test groups.

References groups_.

Referenced by tut::restartable_wrapper::list_groups().

void tut::test_runner::register_group ( const std::string &  name,
group_base gr 
) [inline]

Stores another group for getting by name.

References groups_, and wibble::iterator().

Referenced by tut::restartable_wrapper::register_group(), and tut::test_group< Data, MaxTestsInGroup >::test_group().

test_result tut::test_runner::run_test ( const std::string &  group_name,
int  n 
) const [inline]

void tut::test_runner::run_tests ( const std::string &  group_name  )  const [inline]

void tut::test_runner::run_tests (  )  const [inline]

Runs all tests in all groups.

Parameters:
callback Callback object if exists; null otherwise

References callback_, tut::callback::group_completed(), tut::callback::group_started(), groups_, tut::callback::run_completed(), and tut::callback::run_started().

void tut::test_runner::set_callback ( callback cb  )  [inline]

Stores callback object.

References callback_, and default_callback_.


Member Data Documentation

Referenced by set_callback().


The documentation for this class was generated from the following file:

Generated on Fri Jun 12 05:14:18 2009 for wibble by  doxygen 1.5.9