#include <tut.h>
Inheritance diagram for tut::test_group< Data, MaxTestsInGroup >:
Public Types | |
typedef test_object< Data > | object |
Public Member Functions | |
test_group (const char *name) | |
test_group (const char *name, test_runner &another_runner) | |
void | reg (int n, testmethod tm) |
void | rewind () |
test_result | run_next () |
test_result | run_test (int n) |
Private Types | |
typedef void(test_object< Data >::*) | testmethod () |
typedef std::map< int, testmethod > | tests |
typedef tests::iterator | tests_iterator |
typedef tests::const_iterator | tests_const_iterator |
typedef tests::const_reverse_iterator | tests_const_reverse_iterator |
typedef tests::size_type | size_type |
Private Member Functions | |
test_result | run_test_ (const tests_iterator &ti, safe_holder< object > &obj) |
bool | run_test_seh_ (testmethod tm, safe_holder< object > &obj) |
Private Attributes | |
const char * | name_ |
tests | tests_ |
tests_iterator | current_test_ |
Classes | |
class | safe_holder |
Definition at line 531 of file tut.h.
typedef test_object<Data> tut::test_group< Data, MaxTestsInGroup >::object |
typedef tests::size_type tut::test_group< Data, MaxTestsInGroup >::size_type [private] |
typedef void(test_object<Data>::*) tut::test_group< Data, MaxTestsInGroup >::testmethod() [private] |
typedef std::map<int,testmethod> tut::test_group< Data, MaxTestsInGroup >::tests [private] |
typedef tests::const_iterator tut::test_group< Data, MaxTestsInGroup >::tests_const_iterator [private] |
typedef tests::const_reverse_iterator tut::test_group< Data, MaxTestsInGroup >::tests_const_reverse_iterator [private] |
typedef tests::iterator tut::test_group< Data, MaxTestsInGroup >::tests_iterator [private] |
tut::test_group< Data, MaxTestsInGroup >::test_group | ( | const char * | name | ) | [inline] |
Creates and registers test group with specified name.
Definition at line 650 of file tut.h.
References tut::test_runner_singleton::get(), tut::test_group< Data, MaxTestsInGroup >::name_, tut::test_runner::register_group(), and tut::runner.
Here is the call graph for this function:
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 663 of file tut.h.
References tut::test_group< Data, MaxTestsInGroup >::name_, tut::test_group< Data, MaxTestsInGroup >::reg(), and tut::test_runner::register_group().
Here is the call graph for this function:
void tut::test_group< Data, MaxTestsInGroup >::reg | ( | int | n, | |
testmethod | tm | |||
) | [inline] |
Registers test method under given number.
Definition at line 677 of file tut.h.
References tut::test_group< Data, MaxTestsInGroup >::tests_.
Referenced by tut::test_group< Data, MaxTestsInGroup >::test_group().
void tut::test_group< Data, MaxTestsInGroup >::rewind | ( | ) | [inline, virtual] |
Reset test position before first test.
Implements tut::group_base.
Definition at line 685 of file tut.h.
References tut::test_group< Data, MaxTestsInGroup >::current_test_, and tut::test_group< Data, MaxTestsInGroup >::tests_.
test_result tut::test_group< Data, MaxTestsInGroup >::run_next | ( | ) | [inline, virtual] |
Runs next test.
Implements tut::group_base.
Definition at line 693 of file tut.h.
References tut::test_group< Data, MaxTestsInGroup >::current_test_, tut::test_group< Data, MaxTestsInGroup >::run_test_(), and tut::test_group< Data, MaxTestsInGroup >::tests_.
Here is the call graph for this function:
test_result tut::test_group< Data, MaxTestsInGroup >::run_test | ( | int | n | ) | [inline, virtual] |
Runs one test by position.
Implements tut::group_base.
Definition at line 720 of file tut.h.
References tut::test_group< Data, MaxTestsInGroup >::run_test_(), and tut::test_group< Data, MaxTestsInGroup >::tests_.
Here is the call graph for this function:
test_result tut::test_group< Data, MaxTestsInGroup >::run_test_ | ( | const tests_iterator & | ti, | |
safe_holder< object > & | obj | |||
) | [inline, private] |
VC allows only one exception handling type per function, so I have to split the method
Definition at line 739 of file tut.h.
References tut::test_result::ex, tut::test_result::fail, tut::test_group< Data, MaxTestsInGroup >::name_, tut::test_result::ok, tut::test_group< Data, MaxTestsInGroup >::run_test_seh_(), tut::test_result::term, and tut::test_result::warn.
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:
bool tut::test_group< Data, MaxTestsInGroup >::run_test_seh_ | ( | testmethod | tm, | |
safe_holder< object > & | obj | |||
) | [inline, private] |
Runs one under SEH if platform supports it.
Definition at line 789 of file tut.h.
References tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::get(), tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::permit_throw(), tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::release(), and tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::reset().
Referenced by tut::test_group< Data, MaxTestsInGroup >::run_test_().
Here is the call graph for this function:
tests_iterator tut::test_group< Data, MaxTestsInGroup >::current_test_ [private] |
Definition at line 544 of file tut.h.
Referenced by tut::test_group< Data, MaxTestsInGroup >::rewind(), and tut::test_group< Data, MaxTestsInGroup >::run_next().
const char* tut::test_group< Data, MaxTestsInGroup >::name_ [private] |
Definition at line 533 of file tut.h.
Referenced by tut::test_group< Data, MaxTestsInGroup >::run_test_(), and tut::test_group< Data, MaxTestsInGroup >::test_group().
tests tut::test_group< Data, MaxTestsInGroup >::tests_ [private] |
Definition at line 543 of file tut.h.
Referenced by tut::test_group< Data, MaxTestsInGroup >::reg(), tut::test_group< Data, MaxTestsInGroup >::rewind(), tut::test_group< Data, MaxTestsInGroup >::run_next(), and tut::test_group< Data, MaxTestsInGroup >::run_test().