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

#include <tut.h>

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.

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, testmethodtests
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

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 531 of file tut.h.


Member Typedef Documentation

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

Definition at line 645 of file tut.h.

template<class Data, int MaxTestsInGroup = 50>
typedef tests::size_type tut::test_group< Data, MaxTestsInGroup >::size_type [private]

Definition at line 541 of file tut.h.

template<class Data, int MaxTestsInGroup = 50>
typedef void(test_object<Data>::*) tut::test_group< Data, MaxTestsInGroup >::testmethod() [private]

Definition at line 535 of file tut.h.

template<class Data, int MaxTestsInGroup = 50>
typedef std::map<int,testmethod> tut::test_group< Data, MaxTestsInGroup >::tests [private]

Definition at line 536 of file tut.h.

template<class Data, int MaxTestsInGroup = 50>
typedef tests::const_iterator tut::test_group< Data, MaxTestsInGroup >::tests_const_iterator [private]

Definition at line 538 of file tut.h.

template<class Data, int MaxTestsInGroup = 50>
typedef tests::const_reverse_iterator tut::test_group< Data, MaxTestsInGroup >::tests_const_reverse_iterator [private]

Definition at line 540 of file tut.h.

template<class Data, int MaxTestsInGroup = 50>
typedef tests::iterator tut::test_group< Data, MaxTestsInGroup >::tests_iterator [private]

Definition at line 537 of file tut.h.


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 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:

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 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:


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 677 of file tut.h.

References tut::test_group< Data, MaxTestsInGroup >::tests_.

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 685 of file tut.h.

References tut::test_group< Data, MaxTestsInGroup >::current_test_, and tut::test_group< Data, MaxTestsInGroup >::tests_.

template<class Data, int MaxTestsInGroup = 50>
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:

template<class Data, int MaxTestsInGroup = 50>
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:

template<class Data, int MaxTestsInGroup = 50>
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:

template<class Data, int MaxTestsInGroup = 50>
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:


Member Data Documentation

template<class Data, int MaxTestsInGroup = 50>
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().

template<class Data, int MaxTestsInGroup = 50>
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().

template<class Data, int MaxTestsInGroup = 50>
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().


The documentation for this class was generated from the following file:
Generated on Fri Oct 26 13:35:18 2007 for FEMAXX (Finite Element Maxwell Eigensolver) by  doxygen 1.4.7