proptest 0.1.1

Hypothesis-like property-based testing and shrinking.


Proptest is a property testing framework (the family of which QuickCheck is perhaps most well-known) inspired by Hypothesis. It allows to test that certain properties of your code hold for arbitrary inputs, and if a failure is found, automatically finds the minimal test case to reproduce the problem. Unlike QuickCheck, generation and shrinking is defined on a per-value basis instead of per-type, which makes it much more flexible and simplifies composition.

For a full introduction and examples, see the documentation.


In my personal usage, everything works pretty well, though the crate itself has a few rough edges.

There may be breaking changes when "impl Trait" becomes stable or when the possible restructuring of the rand crate occurs.


0.1.1: Add strategy::NoShrink, Strategy::no_shrink().


This crate wouldn't have come into existence had it not been for the Rust port of QuickCheck and the regex_generate crate which gave wonderful examples of what is possible.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.