Crate proptest
Proptest Reference Documentation
This is the reference documentation for the proptest API.
For documentation on how to get started with proptest and general usage advice, please refer to the Proptest Book.
Modules
-
arbitrary
Defines the
Arbitrarytrait and related free functions and type aliases. - array Support for strategies producing fixed-length arrays.
- bits Strategies for working with bit sets.
-
bool
Strategies for generating
boolvalues. -
char
Strategies for generating
charvalues. -
collection
Strategies for generating
std::collectionsof values. - num Strategies to generate numeric values (as opposed to integers used as bit fields).
-
option
Strategies for generating
std::Optionvalues. -
path
Strategies for generating
PathBufand related path types. - prelude Re-exports the most commonly-needed APIs of proptest.
-
result
Strategies for combining delegate strategies into
std::Results. - sample Strategies for generating values by taking samples of collections.
- strategy Defines the core traits used by Proptest.
- string Strategies for generating strings and byte strings from regular expressions.
- test_runner State and functions for running proptest tests.
- tuple Support for combining strategies into tuples.
Macros
-
prop_assert
Similar to
assert!from std, but returns a test failure instead of panicking if the condition fails. -
prop_assert_eq
Similar to
assert_eq!from std, but returns a test failure instead of panicking if the condition fails. -
prop_assert_ne
Similar to
assert_ne!from std, but returns a test failure instead of panicking if the condition fails. - prop_assume Rejects the test input if assumptions are not met.
- prop_compose Convenience to define functions which produce new strategies.
- prop_oneof Produce a strategy which picks one of the listed choices.
-
proptest
Easily define
proptesttests.