Module arbitrary
Defines the Arbitrary trait and related free functions
and type aliases.
See the Arbitrary trait for more information.
Modules
-
functor
Provides higher order
Arbitrarytraits. This is mainly for use byproptest_derive.
Traits
Functions
-
any
Generates a
Strategyproducing [Arbitrary][trait Arbitrary] values ofA. Unlike [arbitrary][fn arbitrary], it should be used for being explicit on whatAis. For clarity, this may be a good idea. -
any_with
Generates a
StrategyproducingArbitraryvalues ofAwith the given configuration arguments passed inargs. Unlikearbitrary_with, it should be used for being explicit on whatAis. For clarity, this may be a good idea. -
arbitrary
Generates a
StrategyproducingArbitraryvalues ofA. Works better with type inference than [any::<A>()]. -
arbitrary_with
Generates a
StrategyproducingArbitraryvalues ofAwith the given configuration arguments passed inargs. Works better with type inference than [any_with::<A>(args)].
Type Aliases
-
Mapped
A normal map from a strategy of
ItoO. -
ParamsFor
ParamsForallows you to mention the type ofParametersfor the input typeAwithout directly using associated types or without resorting to existential types. This way, if implementation ofArbitrarychanges, your tests should not break. -
SMapped
A static map from a strategy of
ItoO. -
StrategyFor
StrategyForallows you to mention the type ofStrategyfor the input typeAwithout directly using associated types or without resorting to existential types. This way, if implementation ofArbitrarychanges, your tests should not break. This can be especially beneficial when the type ofStrategythat you are dealing with is very long in name (the case with generics).