Module proptest::strategy [] [src]

Defines the core traits used by Proptest.

Modules

statics

Modified versions of the normal strategy combinators which take specialised traits instead of normal functions.

Structs

Filter

Strategy and ValueTree filter adaptor.

Flatten

Adaptor that flattens a Strategy which produces other Strategys into a Strategy that picks one of those strategies and then picks values from it.

FlattenValueTree

The ValueTree produced by Flatten.

IndFlatten

Similar to Flatten, but does not shrink the input strategy.

IndFlattenMap

Similar to Map plus Flatten, but does not shrink the input strategy and passes the original input through.

Just

A Strategy which always produces a single value value and never simplifies.

Map

Strategy and ValueTree map adaptor.

NoShrink

Wraps a Strategy or ValueTree to suppress shrinking of generated values.

Recursive

Return type from Strategy::prop_recursive().

Singleton

A Strategy which always produces a single value value and never simplifies.

TupleUnion

Similar to Union, but internally uses a tuple to hold the strategies.

TupleUnionValueTree

ValueTree type produced by TupleUnion.

Union

A Strategy which picks from one of several delegate Stragegys.

UnionValueTree

ValueTree corresponding to Union.

Traits

Strategy

A strategy for producing arbitrary values of a given type.

ValueTree

A generated value and its associated shrinker.

Functions

float_to_weight

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 Definitions

BoxedStrategy

Shorthand for a boxed Strategy trait object as produced by Strategy::boxed().