Module prelude

Module prelude 

Source

Modules§

prop
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§

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.
prop_test
proptest
Easily define proptest tests.

Structs§

BoxedStrategy
A boxed Strategy trait object as produced by Strategy::boxed().
Just
A Strategy which always produces a single value value and never simplifies.
ProptestConfig
Configuration for how a proptest test should be run.
SBoxedStrategy
A boxed Strategy trait object which is also Sync and Send, as produced by Strategy::sboxed().

Enums§

TestCaseError
Errors which can be returned from test cases to indicate non-successful completion.

Traits§

Arbitrary
Arbitrary determines a canonical Strategy for the implementing type.
ProptestResultExt
Extension trait for Result<T, E> to provide additional functionality specifically for prop test cases.
Rng
User-level interface for RNGs
RngCore
Implementation-level interface for RNGs
Strategy
A strategy for producing arbitrary values of a given type.

Functions§

any
Generates a Strategy producing Arbitrary values of A. Unlike arbitrary, it should be used for being explicit on what A is. For clarity, this may be a good idea.
any_with
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.