5 releases

Uses old Rust 2015

0.1.4 Oct 31, 2017
0.1.3 Oct 30, 2017
0.1.2 Oct 22, 2017
0.1.1 Oct 22, 2017
0.1.0 Oct 8, 2017

#8 in #shrinking

Download history 3/week @ 2023-11-20 15/week @ 2023-11-27 2/week @ 2024-01-01 5/week @ 2024-01-08 8/week @ 2024-02-12 13/week @ 2024-02-19 22/week @ 2024-02-26 19/week @ 2024-03-04

62 downloads per month
Used in 5 crates (3 directly)

Apache-2.0

58KB
1.5K SLoC

Suppositions

A property testing library for Rust, inspired by Hypothesis, Theft and Hedgehog.

Compositional data generators

In regular quickcheck-alikes, you generally specify data generators per type. This is fine most of the time, but if you only want to check a subset of your inputs, then you end up having to tell the library to skip items needlessly.

Like hypothesis, we generate data by sampling an underlying stream of bytes; where we add the constraint that where the stream is "smaller" (either smaller values or shorter) the generated values should be similarly smaller.

This also means that the shrunk values from your first failing test will fulfil the constraints imposed by your generators.

Integrated shrinking.

This essentially falls out of the above. Because generation is done from an underlying format; we don't need to re-implement shrinking for each individual type.

License

Released under the Apache 2.0 license.


Copyright 2017 Ceri Storey, Oliver Wyman.

Dependencies

~485–710KB
~10K SLoC