Hegel.Generator (hegel_elixir v0.1.0)
View SourceA value generator driven by a Hegel test case.
A generator receives the current Hegel.TestCase and asks libhegel for each
choice. The engine records those choices for replay and shrinking.
Build common generators with Hegel.Generators. Use new/1 for a custom
generator.
Summary
Types
Functions
@spec new((Hegel.TestCase.t() -> value)) :: t(value) when value: term()
Builds a generator from a function which receives the active test case.
Prefer Hegel.Generators.composite/1 when the function draws from other
generators, since it adds a structural span for better shrinking.