Expand description
Re-exports the most commonly-needed APIs of proptest.
This module is intended to be wildcard-imported, i.e.,
use proptest::prelude::*;. Note that it re-exports the whole crate itself
under the name prop, so you don’t need a separate use proptest; line.
In addition to Proptest’s own APIs, this also reexports a small portion of
the rand crate sufficient to easily use prop_perturb and other
functionality that exposes random number generators. Please note that this
is will always be a direct reexport; using these in preference to using the
rand crate directly will not provide insulation from the upcoming
revision to the rand crate.
Modules
Re-exports the entire public API of proptest so that an import of prelude
allows simply writing, for example, prop::num::i32::ANY rather than
proptest::num::i32::ANY plus a separate use proptest;.
Macros
Similar to assert! from std, but returns a test failure instead of
panicking if the condition fails.
Similar to assert_eq! from std, but returns a test failure instead of
panicking if the condition fails.
Similar to assert_ne! from std, but returns a test failure instead of
panicking if the condition fails.
Rejects the test input if assumptions are not met.
Convenience to define functions which produce new strategies.
Produce a strategy which picks one of the listed choices.
Easily define proptest tests.
Structs
A boxed Strategy trait object as produced by Strategy::boxed().
A Strategy which always produces a single value value and never
simplifies.
Configuration for how a proptest test should be run.
A boxed Strategy trait object which is also Sync and
Send, as produced by Strategy::sboxed().
Enums
Errors which can be returned from test cases to indicate non-successful completion.
Traits
An automatically-implemented extension trait on RngCore providing high-level
generic methods for sampling values and other convenience methods.
The core of a random number generator.
A strategy for producing arbitrary values of a given type.
Functions
Generates a Strategy producing Arbitrary values of A with the
given configuration arguments passed in args. Unlike arbitrary_with,
it should be used for being explicit on what A is.
For clarity, this may be a good idea.