Property-Based Testing
State based testing commands
Discard a test case
Execute a state machine model
Hedgehog property test
Random Sample Generation
Generators
Generate a list of possible actions.
Generate a float with a gamma distribution
Generate a vector of values from a generator
Generate a date between the from and to dates specified.
Sample from a generator.
Generate a float with a gamma distribution
Generate a list of values, with length bounded by the size parameter.
Stop a generator from shrinking
Build recursive structures in a way that guarantees termination.
Run a generator
Helper to create a generator with a shrink function.
Sized generator creation
Generate a structure
Generate a float between the from and to the values specified.
Compose generators
Property based testing in R
Shrink a number by dividing it into halves.
Shrink a list by edging towards the empty list.
Produce permutations of removing num elements from a list.
Shrink an integral number by edging towards a destination.
A symbolic value.
Lazy rose trees
Creating trees of lists
Hedgehog will eat all your bugs. 'Hedgehog' is a property-based testing package in the spirit of 'QuickCheck'. With 'Hedgehog', one can test properties of their programs against randomly generated input, providing far superior test coverage compared to unit testing. One of the key benefits of 'Hedgehog' is integrated shrinking of counterexamples, which allows one to quickly find the cause of bugs, given salient examples when incorrect behaviour occurs.