Expand description
Defines the core traits used by Proptest.
Modules§
- Modified versions of the normal strategy combinators which take specialised traits instead of normal functions.
Structs§
- A boxed
Strategy
trait object as produced byStrategy::boxed()
. - Options passed to
check_strategy_sanity()
. Strategy
andValueTree
filter adaptor.Strategy
andValueTree
filter_map adaptor.ValueTree
corresponding toFilterMap
.- Adaptor that flattens a
Strategy
which produces otherStrategy
s into aStrategy
that picks one of those strategies and then picks values from it. - The
ValueTree
produced byFlatten
. - Adaptor for
Strategy
andValueTree
which guardssimplify()
andcomplicate()
to avoid contract violations. - Similar to
Flatten
, but does not shrink the input strategy. - Similar to
Map
plusFlatten
, but does not shrink the input strategy and passes the original input through. - A
Strategy
which always produces a single value value and never simplifies. - A
Strategy
which always produces a single value value and never simplifies. IfT
isClone
, you should useJust
instead. - Represents a value tree that is initialized on the first call to any methods.
Strategy
andValueTree
map adaptor.Strategy
andValueTree
map into adaptor.- Wraps a
Strategy
orValueTree
to suppress shrinking of generated values. Strategy
perturbation adaptor.ValueTree
perturbation adaptor.- Return type from
Strategy::prop_recursive()
. - A boxed
Strategy
trait object which is alsoSync
andSend
, as produced byStrategy::sboxed()
. Strategy
shuffle adaptor.ValueTree
shuffling adaptor.- Similar to
Union
, but internally uses a tuple to hold the strategies. ValueTree
type produced byTupleUnion
.- A
Strategy
which picks from one of several delegateStragegy
s. ValueTree
corresponding toUnion
.
Traits§
- A value which can be used with the
prop_shuffle
combinator. - A strategy for producing arbitrary values of a given type.
- A generated value and its associated shrinker.
Functions§
- Run some tests on the given
Strategy
to ensure that it upholds the simplify/complicate contracts. - Convert a floating-point weight in the range (0.0,1.0) to a pair of weights that can be used with
Union
and similar.
Type Aliases§
- Shorthand for
LazyJust<T, fn () -> T>
. - A relative
weight
of a particularStrategy
corresponding toT
coupled withT
itself. The weight is currently given inu32
. - A relative
weight
of a particularStrategy
corresponding toT
coupled withArc<T>
. The weight is currently given inu32
.