Unit tests collection.
More...
#include <unit.hpp>
Unit tests collection.
This class aims to provide (un)intialization functions (either global and per test) and unit tests registration
- Author
- Vincent Lachenal
- Since
- 0.1
◆ UnitTests()
anch::ut::UnitTests::UnitTests |
( |
| ) |
|
◆ ~UnitTests()
virtual anch::ut::UnitTests::~UnitTests |
( |
| ) |
|
|
virtual |
◆ add()
UnitTests & anch::ut::UnitTests::add |
( |
const std::string & | name, |
|
|
std::function< void(void)> | testFunc ) |
Unit test function setter
- Parameters
-
name | the unit test's name |
testFunc | the function to add |
- Returns
this
◆ after()
void anch::ut::UnitTests::after |
( |
| ) |
const |
Call uninitialiation unit test
◆ afterTest()
UnitTests & anch::ut::UnitTests::afterTest |
( |
std::function< void(void)> | afterFunc | ) |
|
Unit test uninitialization function setter
- Parameters
-
afterFunc | the function to set |
- Returns
this
◆ before()
void anch::ut::UnitTests::before |
( |
| ) |
const |
Call initialiation unit test
◆ beforeTest()
UnitTests & anch::ut::UnitTests::beforeTest |
( |
std::function< void(void)> | beforeFunc | ) |
|
Unit test initialization function setter
- Parameters
-
beforeFunc | the function to set |
- Returns
this
◆ description()
UnitTests & anch::ut::UnitTests::description |
( |
const std::string & | description | ) |
|
Unit tests colletion description setter
This field is used for reporting usage.
- Parameters
-
description | the description to set |
- Returns
this
◆ getDescription()
const std::string & anch::ut::UnitTests::getDescription |
( |
| ) |
const |
Unit tests collection's description getter
- Returns
- the description
◆ getName()
const std::string & anch::ut::UnitTests::getName |
( |
| ) |
const |
Unit tests collection's name getter
- Returns
- the name
◆ getTests()
const std::map< std::string, std::function< void(void)> > & anch::ut::UnitTests::getTests |
( |
| ) |
const |
Unit tests gettter
- Returns
- the tests
◆ initialize() [1/2]
void anch::ut::UnitTests::initialize |
( |
| ) |
const |
Call initialiation unit tests collection
◆ initialize() [2/2]
UnitTests & anch::ut::UnitTests::initialize |
( |
std::function< void(void)> | initFunc | ) |
|
Unit tests colletion initialization function setter
- Parameters
-
initFunc | the function to set |
- Returns
this
◆ name()
UnitTests & anch::ut::UnitTests::name |
( |
const std::string & | name | ) |
|
Unit tests colletion name setter.
This field is used for reporting usage.
- Parameters
-
- Returns
this
◆ setTests()
void anch::ut::UnitTests::setTests |
( |
const std::map< std::string, std::function< void(void)> > & | tests | ) |
|
Unit tests setters
- Parameters
-
◆ uninitialize() [1/2]
void anch::ut::UnitTests::uninitialize |
( |
| ) |
const |
Call uninitialiation unit tests collection
◆ uninitialize() [2/2]
UnitTests & anch::ut::UnitTests::uninitialize |
( |
std::function< void(void)> | uninitFunc | ) |
|
Unit tests colletion uninitialization function setter
- Parameters
-
uninitFunc | the function to set |
- Returns
this
The documentation for this class was generated from the following file: