|
Hegel 0.18.2
Property-based testing for C++
|
The generator that map() returns. More...
#include <core.h>
Public Member Functions | |
| Generator< U > | print_as_call (std::string_view function) const |
Make a generator that prints a call of function with the drawn input. | |
The generator that map() returns.
It derives from Generator<U> when hegel::is_representable_v is true for U, and from AnyGenerator<U> otherwise, so it can be used wherever those can.
| U | The type of the values it makes |
| SourcePrintable | Whether the mapped generator is printable |
|
inline |
Make a generator that prints a call of function with the drawn input.
A map() prints the value it made. This prints the value drawn from the mapped generator instead, as that generator prints it, in a call of function, so a type with no C++ representation can be printed. The mapped generator must be printable.
| function | The name of the mapping function. |
| std::invalid_argument | if function is empty. |