Module proptest

Source
Expand description

Testing over generated inputs, ala QuickCheck.

See crate ::proptest.

Modules§

arbitrary
Defines the Arbitrary trait 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 bool values.
char
Strategies for generating char values.
collection
Strategies for generating std::collections of values.
num
Strategies to generate numeric values (as opposed to integers used as bit fields).
option
Strategies for generating std::Option values.
path
Strategies for generating [PathBuf] and 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 proptest tests.