An invariant is a predicate that must hold at any point in the stateful test. They are evaluated in full on the initial and final state and sampled at intermediate join points. The invariant function should throw when the invariant is violated.
More...
#include <stateful.h>
|
| | Invariant (std::string name, std::function< void(const T &)> invariant) |
| | Declare a new invariant.
|
| const std::string & | name () const |
| | Returns the name of the invariant.
|
| const std::function< void(const T &)> & | invariant () const |
| | Returns the function representing the predicate of the invariant.
|
template<typename T>
class hegel::stateful::Invariant< T >
An invariant is a predicate that must hold at any point in the stateful test. They are evaluated in full on the initial and final state and sampled at intermediate join points. The invariant function should throw when the invariant is violated.
- Template Parameters
-
| T | The state-machine type the invariant checks |
◆ Invariant()
Declare a new invariant.
- Parameters
-
◆ invariant()
Returns the function representing the predicate of the invariant.
- Returns
- const std::function<void(const T&)>&
◆ name()
Returns the name of the invariant.
- Returns
- const std::string&
The documentation for this class was generated from the following file: