cipra: cipra::counter< integralT > Class Template Reference

| cipra 1.2.1 A C++11 Unit Testing Framework based on Test::More

- Main Page
- Related Pages
- Namespaces
- Classes

- Class List
- Class Index
- Class Members

All Classes Namespaces Functions Variables Typedefs Pages
Public Types | Public Member Functions | List of all members
cipra::counter< integralT > Class Template Reference

Manages the test numbers in test output. More...

`#include <counter.hpp>`

## Public Types
typedef std::make_unsigned < integralT >::type | index_type
| The index type of the counter. The actual index type is going to be the unsigned counterpart of the template parameter `T`.

## Public Member Functions
| counter ()
| Initializes the atomic counter. More...
index_type | new_test_number ()
| Returns a unique test number. More...

## Detailed Description

### template<typename integralT = int>
class cipra::counter< integralT >

Manages the test numbers in test output.

Guarantees that each test has a different number, even if multiple threads are testing at the same time.

Version
  1.0

Author
  Patrick M. Niedzielski

Date
  2012-09-26

Since
  1.0

Template Parameters

  integralT | The type that the test numbers should have. This must be a POD integer type. The actual return value will be the unsigned counterpart of this type if it is not already unsigned.

## Constructor & Destructor Documentation

template<typename integralT = int>

cipra::counter< integralT >::counter | ( |  | ) |
| inline

Initializes the atomic counter.

Author
  Patrick M. Niedzielski

Date
  2012-09-26

Since
  1.0

## Member Function Documentation

template<typename integralT = int>

index_type cipra::counter< integralT >::new_test_number | ( |  | ) |
| inline

Returns a unique test number.

Author
  Patrick M. Niedzielski

Date
  2012-09-26

Since
  1.0

Returns
  A number that corresponds to the order in which the test was run.