Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 930 Bytes

property-testing.md

File metadata and controls

24 lines (16 loc) · 930 Bytes

Property testing

We use the bolero property testing / fuzzing framework to write property-based tests.

The TypeGenerator trait

If a type implements TypeGenerator, that implementation should

  • eventually cover all possible legal values,
  • never produce an illegal value.

If a more restricted set of values is needed or useful, implement ValueGenerator instead of (or in addition to) TypeGenerator.

The ValueGenerator trait

A type may implement ValueGenerator to provide a more restricted set of values than those provided by TypeGenerator. This is useful if you wish to focus fuzzing efforts more narrowly than a correct implementation of TypeGenerator allows.