tut logo

TUT: tut::test_group< Data, MaxTestsInGroup > Class Template Reference


tut::test_group< Data, MaxTestsInGroup > Class Template Reference

#include <tut.hpp>

Inheritance diagram for tut::test_group< Data, MaxTestsInGroup >:

Inheritance graph
[legend]
Collaboration diagram for tut::test_group< Data, MaxTestsInGroup >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class Data, int MaxTestsInGroup = 50>
class tut::test_group< Data, MaxTestsInGroup >

Test group; used to recreate test object instance for each new test since we have to have reinitialized Data base class.

Definition at line 147 of file tut.hpp.


Public Types

typedef test_object< Data > object

Public Member Functions

void reg (int n, testmethod tm)
void reset_holder_ (safe_holder< object > &obj)
void rewind ()
bool run_next (test_result &tr)
bool run_test (int n, test_result &tr)
bool run_test_ (const tests_iterator &ti, safe_holder< object > &obj, test_result &tr)
seh_result run_test_seh_ (testmethod tm, safe_holder< object > &obj, std::string &current_test_name, int current_test_id)
 test_group (const char *name, test_runner &another_runner)
 test_group (const char *name)

Classes

class  safe_holder

Constructor & Destructor Documentation

template<class Data, int MaxTestsInGroup = 50>
tut::test_group< Data, MaxTestsInGroup >::test_group ( const char *  name  )  [inline]

Creates and registers test group with specified name.

Definition at line 300 of file tut.hpp.

References tut::test_runner_singleton::get(), and tut::test_runner::register_group().

Here is the call graph for this function:

template<class Data, int MaxTestsInGroup = 50>
tut::test_group< Data, MaxTestsInGroup >::test_group ( const char *  name,
test_runner another_runner 
) [inline]

This constructor is used in self-test run only.

Definition at line 315 of file tut.hpp.

References tut::test_group< Data, MaxTestsInGroup >::reg(), and tut::test_runner::register_group().

Here is the call graph for this function:


Member Function Documentation

template<class Data, int MaxTestsInGroup = 50>
void tut::test_group< Data, MaxTestsInGroup >::reg ( int  n,
testmethod  tm 
) [inline]

Registers test method under given number.

Definition at line 331 of file tut.hpp.

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

template<class Data, int MaxTestsInGroup = 50>
void tut::test_group< Data, MaxTestsInGroup >::rewind (  )  [inline, virtual]

Reset test position before first test.

Implements tut::group_base.

Definition at line 339 of file tut.hpp.

template<class Data, int MaxTestsInGroup = 50>
bool tut::test_group< Data, MaxTestsInGroup >::run_next ( test_result tr  )  [inline, virtual]

Runs next test.

Implements tut::group_base.

Definition at line 347 of file tut.hpp.

References tut::test_result::dummy, tut::test_result::result, and tut::test_group< Data, MaxTestsInGroup >::run_test_().

Here is the call graph for this function:

template<class Data, int MaxTestsInGroup = 50>
bool tut::test_group< Data, MaxTestsInGroup >::run_test ( int  n,
test_result tr 
) [inline, virtual]

Runs one test by position.

Implements tut::group_base.

Definition at line 372 of file tut.hpp.

References tut::test_group< Data, MaxTestsInGroup >::run_test_().

Here is the call graph for this function:

template<class Data, int MaxTestsInGroup = 50>
bool tut::test_group< Data, MaxTestsInGroup >::run_test_ ( const tests_iterator &  ti,
safe_holder< object > &  obj,
test_result tr 
) [inline]

VC allows only one exception handling type per function, so I have to split the method.

Definition at line 395 of file tut.hpp.

References tut::test_result::dummy, tut::test_result::ex, tut::test_result::exception_typeid, tut::test_result::message, tut::test_result::name, tut::test_result::ok, tut::tut_error::result(), tut::test_result::result, tut::test_group< Data, MaxTestsInGroup >::run_test_seh_(), tut::test_group_posix::send_result_(), tut::rethrown::tr, tut::tut_error::type(), tut::type_name(), and tut::tut_error::what().

Referenced by tut::test_group< Data, MaxTestsInGroup >::run_next(), and tut::test_group< Data, MaxTestsInGroup >::run_test().

Here is the call graph for this function:

template<class Data, int MaxTestsInGroup = 50>
seh_result tut::test_group< Data, MaxTestsInGroup >::run_test_seh_ ( testmethod  tm,
safe_holder< object > &  obj,
std::string &  current_test_name,
int  current_test_id 
) [inline]

Runs one under SEH if platform supports it.

Definition at line 464 of file tut.hpp.

References tut::test_group< Data, MaxTestsInGroup >::reset_holder_().

Referenced by tut::test_group< Data, MaxTestsInGroup >::run_test_().

Here is the call graph for this function:


The documentation for this class was generated from the following file:
All Rights Reserved. Generated on Sun Jan 31 00:39:48 2010 for TUT by doxygen 1.5.1