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

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

`#include <tut.h>`

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

## Public Types

typedef test_object< Data > | object

## Public Member Functions

| test_group (const char *name)
| Creates and registers test group with specified name. More...
| test_group (const char *name, test_runner &another_runner)
| This constructor is used in self-test run only. More...
void | reg (int n, testmethod tm)
| Registers test method under given number. More...
void | rewind ()
| Reset test position before first test. More...
test_result | run_next ()
| Runs next test. More...
test_result | run_test (int n)
| Runs one test by position. More...
Public Member Functions inherited from tut::group_base
virtual | ~group_base ()

## 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.

## Member Typedef Documentation

## object

template<class Data , int MaxTestsInGroup = 50>

typedef test_object<Data> tut::test_group< Data, MaxTestsInGroup >::object

## Constructor & Destructor Documentation

## test_group() [1/2]

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.

References tut::test_runner_singleton::get(), tut::tests_registerer< Test, Group, n >::reg(), tut::test_runner::register_group(), and tut::runner.

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

## test_group() [2/2]

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.

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

## Member Function Documentation

## reg()

template<class Data , int MaxTestsInGroup = 50>

void tut::test_group< Data, MaxTestsInGroup >::reg | ( | int | n,
|  | testmethod | tm
| ) |  |

inline

Registers test method under given number.

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

## rewind()

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.

## run_next()

template<class Data , int MaxTestsInGroup = 50>

test_result tut::test_group< Data, MaxTestsInGroup >::run_next | ( |  | ) |

inline virtual

Runs next test.

Implements tut::group_base.

## run_test()

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.

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

- tut.h