Expand description
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
StrategyproducingArbitraryvalues ofA. Unlikearbitrary, 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 thanany::<A>(). - arbitrary_
with - Generates a
StrategyproducingArbitraryvalues ofAwith the given configuration arguments passed inargs. Works better with type inference thanany_with::<A>(args).
Type Aliases§
- Mapped
- A normal map from a strategy of
ItoO. - Params
For 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. - Strategy
For 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).