Hegel 0.18.3
Property-based testing for C++
Loading...
Searching...
No Matches
hegel::stateful::RuleParams< T > Struct Template Reference

Arguments for the Rule constructor. More...

#include <stateful.h>

Public Attributes

std::string name
 The name of the rule.
double weight = 1.0
std::function< void(TestCase &, T &)> step
 The function the rule applies. See Rule.

Detailed Description

template<typename T>
struct hegel::stateful::RuleParams< T >

Arguments for the Rule constructor.

{.name = "push",
.weight = 6.0,
.step = [](hegel::TestCase& tc, Stack& stack) { ... }});
Handle to the currently-executing test case.
Definition test_case.h:46
A rule is one possible action in a stateful test.
Definition stateful.h:831
Template Parameters
TThe state-machine type the rule acts on

Member Data Documentation

◆ weight

template<typename T>
double hegel::stateful::RuleParams< T >::weight = 1.0

A hint for how often to choose the rule, relative to the other rules. The engine rejects a weight that is not finite and positive.


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