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
Strategytrait object as produced byStrategy::boxed(). - Options passed to
check_strategy_sanity(). StrategyandValueTreefilter adaptor.StrategyandValueTreefilter_map adaptor.ValueTreecorresponding toFilterMap.- Adaptor that flattens a
Strategywhich produces otherStrategys into aStrategythat picks one of those strategies and then picks values from it. - The
ValueTreeproduced byFlatten. - Adaptor for
StrategyandValueTreewhich guardssimplify()andcomplicate()to avoid contract violations. - Similar to
Flatten, but does not shrink the input strategy. - Similar to
MapplusFlatten, but does not shrink the input strategy and passes the original input through. - A
Strategywhich always produces a single value value and never simplifies. - A
Strategywhich always produces a single value value and never simplifies. IfTisClone, you should useJustinstead. - Represents a value tree that is initialized on the first call to any methods.
StrategyandValueTreemap adaptor.StrategyandValueTreemap into adaptor.- Wraps a
StrategyorValueTreeto suppress shrinking of generated values. Strategyperturbation adaptor.ValueTreeperturbation adaptor.- Return type from
Strategy::prop_recursive(). - A boxed
Strategytrait object which is alsoSyncandSend, as produced byStrategy::sboxed(). Strategyshuffle adaptor.ValueTreeshuffling adaptor.- Similar to
Union, but internally uses a tuple to hold the strategies. ValueTreetype produced byTupleUnion.- A
Strategywhich picks from one of several delegateStragegys. ValueTreecorresponding toUnion.
Traits§
- A value which can be used with the
prop_shufflecombinator. - A strategy for producing arbitrary values of a given type.
- A generated value and its associated shrinker.
Functions§
- Run some tests on the given
Strategyto 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
Unionand similar.
Type Aliases§
- Shorthand for
LazyJust<T, fn () -> T>. - A relative
weightof a particularStrategycorresponding toTcoupled withTitself. The weight is currently given inu32. - A relative
weightof a particularStrategycorresponding toTcoupled withArc<T>. The weight is currently given inu32.