Trait proptest::strategy::Strategy
[−]
[src]
pub trait Strategy: Debug { type Value: ValueTree; fn new_value(&self, runner: &mut TestRunner) -> Result<Self::Value, String>; fn prop_map<O: Debug, F: Fn(<Self::Value as ValueTree>::Value) -> O>(
self,
fun: F
) -> Map<Self, F>
where
Self: Sized, { ... } fn prop_flat_map<S: Strategy, F: Fn(<Self::Value as ValueTree>::Value) -> S>(
self,
fun: F
) -> Flatten<Map<Self, F>>
where
Self: Sized, { ... } fn prop_ind_flat_map<S: Strategy, F: Fn(<Self::Value as ValueTree>::Value) -> S>(
self,
fun: F
) -> IndFlatten<Map<Self, F>>
where
Self: Sized, { ... } fn prop_ind_flat_map2<S: Strategy, F: Fn(<Self::Value as ValueTree>::Value) -> S>(
self,
fun: F
) -> IndFlattenMap<Self, F>
where
Self: Sized, { ... } fn prop_filter<F: Fn(&<Self::Value as ValueTree>::Value) -> bool>(
self,
whence: String,
fun: F
) -> Filter<Self, F>
where
Self: Sized, { ... } fn prop_union(self, other: Self) -> Union<Self>
where
Self: Sized, { ... } fn prop_recursive<F: Fn(Arc<BoxedStrategy<<Self::Value as ValueTree>::Value>>) -> BoxedStrategy<<Self::Value as ValueTree>::Value>>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F
) -> Recursive<BoxedStrategy<<Self::Value as ValueTree>::Value>, F>
where
Self: Sized + 'static, { ... } fn boxed(self) -> BoxedStrategy<<Self::Value as ValueTree>::Value>
where
Self: Sized + 'static, { ... } fn no_shrink(self) -> NoShrink<Self>
where
Self: Sized, { ... } }
A strategy for producing arbitrary values of a given type.
fmt::Debug
is a hard requirement for all strategies currently due to
prop_flat_map()
. This constraint will be removed when specialisation
becomes stable.
Associated Types
type Value: ValueTree
The value tree generated by this Strategy
.
This also implicitly describes the ultimate value type governed by the
Strategy
.
Required Methods
fn new_value(&self, runner: &mut TestRunner) -> Result<Self::Value, String>
Generate a new value tree from the given runner.
This may fail if there are constraints on the generated value and the
generator is unable to produce anything that satisfies them. Any
failure is wrapped in TestError::Abort
.
Provided Methods
fn prop_map<O: Debug, F: Fn(<Self::Value as ValueTree>::Value) -> O>(
self,
fun: F
) -> Map<Self, F> where
Self: Sized,
self,
fun: F
) -> Map<Self, F> where
Self: Sized,
Returns a strategy which produces values transformed by the function
fun
.
There is no need (or possibility, for that matter) to define how the output is to be shrunken. Shrinking continues to take place in terms of the source value.
fn prop_flat_map<S: Strategy, F: Fn(<Self::Value as ValueTree>::Value) -> S>(
self,
fun: F
) -> Flatten<Map<Self, F>> where
Self: Sized,
self,
fun: F
) -> Flatten<Map<Self, F>> where
Self: Sized,
Maps values produced by this strategy into new strategies and picks values from those strategies.
fun
is used to transform the values produced by this strategy into
other strategies. Values are then chosen from the derived strategies.
Shrinking proceeds by shrinking individual values as well as shrinking
the input used to generate the internal strategies.
Shrinking
In the case of test failure, shrinking will not only shrink the output
from the combinator itself, but also the input, i.e., the strategy used
to generate the output itself. Doing this requires searching the new
derived strategy for a new failing input. The combinator will generate
up to Config::cases
values for this search.
As a result, nested prop_flat_map
/Flatten
combinators risk
exponential run time on this search for new failing values. To ensure
that test failures occur within a reasonable amount of time, all of
these combinators share a single "flat map regen" counter, and will
stop generating new values if it exceeds Config::max_flat_map_regens
.
Example
Generate two integers, where the second is always less than the first, without using filtering:
#[macro_use] extern crate proptest; use proptest::prelude::*; proptest! { #[test] fn test_two( // Pick integers in the 1..65536 range, and derive a strategy // which emits a tuple of that integer and another one which is // some value less than it. (a, b) in (1..65536).prop_flat_map(|a| (Just(a), 0..a)) ) { prop_assert!(b < a); } }
Choosing the right flat-map
Strategy
has three "flat-map" combinators. They look very similar at
first, and can be used to produce superficially identical test results.
For example, the following three expressions all produce inputs which
are 2-tuples (a,b)
where the b
component is less than a
.
use proptest::prelude::*; let flat_map = (1..10).prop_flat_map(|a| (Just(a), 0..a)); let ind_flat_map = (1..10).prop_ind_flat_map(|a| (Just(a), 0..a)); let ind_flat_map2 = (1..10).prop_ind_flat_map2(|a| 0..a);
The three do differ however in terms of how they shrink.
For flat_map
, both a
and b
will shrink, and the invariant that
b < a
is maintained. This is a "dependent" or "higher-order" strategy
in that it remembers that the strategy for choosing b
is dependent on
the value chosen for a
.
For ind_flat_map
, the invariant b < a
is maintained, but only
because a
does not shrink. This is due to the fact that the
dependency between the strategies is not tracked; a
is simply seen as
a constant.
Finally, for ind_flat_map2
, the invariant b < a
is not
maintained, because a
can shrink independently of b
, again because
the dependency between the two variables is not tracked, but in this
case the derivation of a
is still exposed to the shrinking system.
The use-cases for the independent flat-map variants is pretty narrow.
For the majority of cases where invariants need to be maintained and
you want all components to shrink, prop_flat_map
is the way to go.
prop_ind_flat_map
makes the most sense when the input to the map
function is not exposed in the output and shrinking across strategies
is not expected to be useful. prop_ind_flat_map2
is useful for using
related values as starting points while not constraining them to that
relation.
fn prop_ind_flat_map<S: Strategy, F: Fn(<Self::Value as ValueTree>::Value) -> S>(
self,
fun: F
) -> IndFlatten<Map<Self, F>> where
Self: Sized,
self,
fun: F
) -> IndFlatten<Map<Self, F>> where
Self: Sized,
Maps values produced by this strategy into new strategies and picks values from those strategies while considering the new strategies to be independent.
This is very similar to prop_flat_map()
, but shrinking will not
attempt to shrink the input that produces the derived strategies. This
is appropriate for when the derived strategies already fully shrink in
the desired way.
In most cases, you want prop_flat_map()
.
See prop_flat_map()
for a more detailed explanation on how the
three flat-map combinators differ.
fn prop_ind_flat_map2<S: Strategy, F: Fn(<Self::Value as ValueTree>::Value) -> S>(
self,
fun: F
) -> IndFlattenMap<Self, F> where
Self: Sized,
self,
fun: F
) -> IndFlattenMap<Self, F> where
Self: Sized,
Similar to prop_ind_flat_map()
, but produces 2-tuples with the input
generated from self
in slot 0 and the derived strategy in slot 1.
See prop_flat_map()
for a more detailed explanation on how the
three flat-map combinators differ differ.
fn prop_filter<F: Fn(&<Self::Value as ValueTree>::Value) -> bool>(
self,
whence: String,
fun: F
) -> Filter<Self, F> where
Self: Sized,
self,
whence: String,
fun: F
) -> Filter<Self, F> where
Self: Sized,
Returns a strategy which only produces values accepted by fun
.
This results in a very naïve form of rejection sampling and should only
be used if (a) relatively few values will actually be rejected; (b) it
isn't easy to express what you want by using another strategy and/or
map()
.
There are a lot of downsides to this form of filtering. It slows
testing down, since values must be generated but then discarded.
Proptest only allows a limited number of rejects this way (across the
entire TestRunner
). Rejection can interfere with shrinking;
particularly, complex filters may largely or entirely prevent shrinking
from substantially altering the original value.
Local rejection sampling is still preferable to rejecting the entire
input to a test (via TestCaseError::Reject
), however, and the default
number of local rejections allowed is much higher than the number of
whole-input rejections.
whence
is used to record where and why the rejection occurred.
fn prop_union(self, other: Self) -> Union<Self> where
Self: Sized,
Self: Sized,
Returns a strategy which picks uniformly from self
and other
.
When shrinking, if a value from other
was originally chosen but that
value can be shrunken no further, it switches to a value from self
and starts shrinking that.
Be aware that chaining prop_union
calls will result in a very
right-skewed distribution. If this is not what you want, you can call
the .or()
method on the Union
to add more values to the same union,
or directly call Union::new()
.
Both self
and other
must be of the same type. To combine
heterogeneous strategies, call the boxed()
method on both self
and
other
to erase the type differences before calling prop_union()
.
fn prop_recursive<F: Fn(Arc<BoxedStrategy<<Self::Value as ValueTree>::Value>>) -> BoxedStrategy<<Self::Value as ValueTree>::Value>>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F
) -> Recursive<BoxedStrategy<<Self::Value as ValueTree>::Value>, F> where
Self: Sized + 'static,
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F
) -> Recursive<BoxedStrategy<<Self::Value as ValueTree>::Value>, F> where
Self: Sized + 'static,
Generate a recursive structure with self
items as leaves.
recurse
is applied to various strategies that produce the same type
as self
with nesting depth n to create a strategy that produces the
same type with nesting depth n+1. Generated structures will have a
depth between 0 and depth
and will usually have up to desired_size
total elements, though they may have more. expected_branch_size
gives
the expected maximum size for any collection which may contain
recursive elements and is used to control branch probability to achieve
the desired size. Passing a too small value can result in trees vastly
larger than desired.
Note that depth
only counts branches; i.e., depth = 0
is a single
leaf, and depth = 1
is a leaf or a branch containing only leaves.
In practise, generated values usually have a lower depth than depth
(but depth
is a hard limit) and almost always under
expected_branch_size
(though it is not a hard limit) since the
underlying code underestimates probabilities.
Example
use std::collections::HashMap; #[macro_use] extern crate proptest; use proptest::prelude::*; /// Define our own JSON AST type #[derive(Debug, Clone)] enum JsonNode { Null, Bool(bool), Number(f64), String(String), Array(Vec<JsonNode>), Map(HashMap<String, JsonNode>), } // Define a strategy for generating leaf nodes of the AST let json_leaf = prop_oneof![ Just(JsonNode::Null), prop::bool::ANY.prop_map(JsonNode::Bool), prop::num::f64::ANY.prop_map(JsonNode::Number), ".*".prop_map(JsonNode::String), ]; // Now define a strategy for a whole tree let json_tree = json_leaf.prop_recursive( 4, // No more than 4 branch levels deep 64, // Target around 64 total elements 16, // Each collection is up to 16 elements long |element| prop_oneof![ // NB `element` is an `Arc` and we'll need to reference it twice, // so we clone it the first time. prop::collection::vec(element.clone(), 0..16) .prop_map(JsonNode::Array), prop::collection::hash_map(".*", element, 0..16) .prop_map(JsonNode::Map) ].boxed());
fn boxed(self) -> BoxedStrategy<<Self::Value as ValueTree>::Value> where
Self: Sized + 'static,
Self: Sized + 'static,
Erases the type of this Strategy
so it can be passed around as a
simple trait object.
fn no_shrink(self) -> NoShrink<Self> where
Self: Sized,
Self: Sized,
Wraps this strategy to prevent values from being subject to shrinking.
Suppressing shrinking is useful when testing things like linear
approximation functions. Ordinarily, proptest will tend to shrink the
input to the function until the result is just barely outside the
acceptable range whereas the original input may have produced a result
far outside of it. Since this makes it harder to see what the actual
problem is, making the input NoShrink
allows learning about inputs
that produce more incorrect results.
Implementors
impl<S: Strategy + ?Sized> Strategy for Box<S> type Value = S::Value;
impl<'a, S: Strategy + ?Sized> Strategy for &'a S type Value = S::Value;
impl<'a, S: Strategy + ?Sized> Strategy for &'a mut S type Value = S::Value;
impl<S: Strategy + ?Sized> Strategy for Rc<S> type Value = S::Value;
impl<S: Strategy + ?Sized> Strategy for Arc<S> type Value = S::Value;
impl<T: Clone + Debug> Strategy for Just<T> type Value = Self;
impl<T: Strategy> Strategy for NoShrink<T> type Value = NoShrink<T::Value>;
impl<S: Strategy, O: Debug, F: Fn(<S::Value as ValueTree>::Value) -> O> Strategy for proptest::strategy::Map<S, F> type Value = Map<S::Value, F>;
impl<S: Strategy, F: Fn(&<S::Value as ValueTree>::Value) -> bool> Strategy for proptest::strategy::Filter<S, F> type Value = Filter<S::Value, F>;
impl<S: Strategy> Strategy for Flatten<S> where
<S::Value as ValueTree>::Value: Strategy, type Value = FlattenValueTree<S::Value>;impl<S: Strategy> Strategy for IndFlatten<S> where
<S::Value as ValueTree>::Value: Strategy, type Value = <<S::Value as ValueTree>::Value as Strategy>::Value;impl<S: Strategy, R: Strategy, F: Fn(<S::Value as ValueTree>::Value) -> R> Strategy for IndFlattenMap<S, F> type Value = TupleValueTree<(S::Value, R::Value)>;
impl<T: Strategy> Strategy for Union<T> type Value = UnionValueTree<T::Value>;
impl<A: Strategy, B: Strategy> Strategy for TupleUnion<((u32, A), (u32, B))> where
B::Value: ValueTree<Value = <A::Value as ValueTree>::Value>, type Value = TupleUnionValueTree<(A::Value, Option<B::Value>)>;impl<A: Strategy, B: Strategy, C: Strategy> Strategy for TupleUnion<((u32, A), (u32, B), (u32, C))> where
B::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
C::Value: ValueTree<Value = <A::Value as ValueTree>::Value>, type Value = TupleUnionValueTree<(A::Value, Option<B::Value>, Option<C::Value>)>;impl<A: Strategy, B: Strategy, C: Strategy, D: Strategy> Strategy for TupleUnion<((u32, A), (u32, B), (u32, C), (u32, D))> where
B::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
C::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
D::Value: ValueTree<Value = <A::Value as ValueTree>::Value>, type Value = TupleUnionValueTree<(A::Value, Option<B::Value>, Option<C::Value>, Option<D::Value>)>;impl<A: Strategy, B: Strategy, C: Strategy, D: Strategy, E: Strategy> Strategy for TupleUnion<((u32, A), (u32, B), (u32, C), (u32, D), (u32, E))> where
B::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
C::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
D::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
E::Value: ValueTree<Value = <A::Value as ValueTree>::Value>, type Value = TupleUnionValueTree<(A::Value, Option<B::Value>, Option<C::Value>, Option<D::Value>, Option<E::Value>)>;impl<A: Strategy, B: Strategy, C: Strategy, D: Strategy, E: Strategy, F: Strategy> Strategy for TupleUnion<((u32, A), (u32, B), (u32, C), (u32, D), (u32, E), (u32, F))> where
B::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
C::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
D::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
E::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
F::Value: ValueTree<Value = <A::Value as ValueTree>::Value>, type Value = TupleUnionValueTree<(A::Value, Option<B::Value>, Option<C::Value>, Option<D::Value>, Option<E::Value>, Option<F::Value>)>;impl<A: Strategy, B: Strategy, C: Strategy, D: Strategy, E: Strategy, F: Strategy, G: Strategy> Strategy for TupleUnion<((u32, A), (u32, B), (u32, C), (u32, D), (u32, E), (u32, F), (u32, G))> where
B::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
C::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
D::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
E::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
F::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
G::Value: ValueTree<Value = <A::Value as ValueTree>::Value>, type Value = TupleUnionValueTree<(A::Value, Option<B::Value>, Option<C::Value>, Option<D::Value>, Option<E::Value>, Option<F::Value>, Option<G::Value>)>;impl<A: Strategy, B: Strategy, C: Strategy, D: Strategy, E: Strategy, F: Strategy, G: Strategy, H: Strategy> Strategy for TupleUnion<((u32, A), (u32, B), (u32, C), (u32, D), (u32, E), (u32, F), (u32, G), (u32, H))> where
B::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
C::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
D::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
E::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
F::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
G::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
H::Value: ValueTree<Value = <A::Value as ValueTree>::Value>, type Value = TupleUnionValueTree<(A::Value, Option<B::Value>, Option<C::Value>, Option<D::Value>, Option<E::Value>, Option<F::Value>, Option<G::Value>, Option<H::Value>)>;impl<A: Strategy, B: Strategy, C: Strategy, D: Strategy, E: Strategy, F: Strategy, G: Strategy, H: Strategy, I: Strategy> Strategy for TupleUnion<((u32, A), (u32, B), (u32, C), (u32, D), (u32, E), (u32, F), (u32, G), (u32, H), (u32, I))> where
B::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
C::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
D::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
E::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
F::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
G::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
H::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
I::Value: ValueTree<Value = <A::Value as ValueTree>::Value>, type Value = TupleUnionValueTree<(A::Value, Option<B::Value>, Option<C::Value>, Option<D::Value>, Option<E::Value>, Option<F::Value>, Option<G::Value>, Option<H::Value>, Option<I::Value>)>;impl<A: Strategy, B: Strategy, C: Strategy, D: Strategy, E: Strategy, F: Strategy, G: Strategy, H: Strategy, I: Strategy, J: Strategy> Strategy for TupleUnion<((u32, A), (u32, B), (u32, C), (u32, D), (u32, E), (u32, F), (u32, G), (u32, H), (u32, I), (u32, J))> where
B::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
C::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
D::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
E::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
F::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
G::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
H::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
I::Value: ValueTree<Value = <A::Value as ValueTree>::Value>,
J::Value: ValueTree<Value = <A::Value as ValueTree>::Value>, type Value = TupleUnionValueTree<(A::Value, Option<B::Value>, Option<C::Value>, Option<D::Value>, Option<E::Value>, Option<F::Value>, Option<G::Value>, Option<H::Value>, Option<I::Value>, Option<J::Value>)>;impl<T: Debug + 'static, F: Fn(Arc<BoxedStrategy<T>>) -> BoxedStrategy<T>> Strategy for Recursive<BoxedStrategy<T>, F> type Value = Box<ValueTree<Value = T>>;
impl<S: Strategy, F: FilterFn<<S::Value as ValueTree>::Value> + Clone> Strategy for proptest::strategy::statics::Filter<S, F> type Value = Filter<S::Value, F>;
impl<S: Strategy, F: Clone + MapFn<<S::Value as ValueTree>::Value>> Strategy for proptest::strategy::statics::Map<S, F> type Value = Map<S::Value, F>;
impl Strategy for proptest::bool::Any type Value = BoolValueTree;
impl Strategy for Weighted type Value = BoolValueTree;
impl Strategy for proptest::num::i8::Any type Value = BinarySearch;
impl Strategy for Range<i8> type Value = BinarySearch;
impl Strategy for RangeFrom<i8> type Value = BinarySearch;
impl Strategy for RangeTo<i8> type Value = BinarySearch;
impl Strategy for proptest::num::i16::Any type Value = BinarySearch;
impl Strategy for Range<i16> type Value = BinarySearch;
impl Strategy for RangeFrom<i16> type Value = BinarySearch;
impl Strategy for RangeTo<i16> type Value = BinarySearch;
impl Strategy for proptest::num::i32::Any type Value = BinarySearch;
impl Strategy for Range<i32> type Value = BinarySearch;
impl Strategy for RangeFrom<i32> type Value = BinarySearch;
impl Strategy for RangeTo<i32> type Value = BinarySearch;
impl Strategy for proptest::num::i64::Any type Value = BinarySearch;
impl Strategy for Range<i64> type Value = BinarySearch;
impl Strategy for RangeFrom<i64> type Value = BinarySearch;
impl Strategy for RangeTo<i64> type Value = BinarySearch;
impl Strategy for proptest::num::isize::Any type Value = BinarySearch;
impl Strategy for Range<isize> type Value = BinarySearch;
impl Strategy for RangeFrom<isize> type Value = BinarySearch;
impl Strategy for RangeTo<isize> type Value = BinarySearch;
impl Strategy for proptest::num::u8::Any type Value = BinarySearch;
impl Strategy for Range<u8> type Value = BinarySearch;
impl Strategy for RangeFrom<u8> type Value = BinarySearch;
impl Strategy for RangeTo<u8> type Value = BinarySearch;
impl Strategy for proptest::num::u16::Any type Value = BinarySearch;
impl Strategy for Range<u16> type Value = BinarySearch;
impl Strategy for RangeFrom<u16> type Value = BinarySearch;
impl Strategy for RangeTo<u16> type Value = BinarySearch;
impl Strategy for proptest::num::u32::Any type Value = BinarySearch;
impl Strategy for Range<u32> type Value = BinarySearch;
impl Strategy for RangeFrom<u32> type Value = BinarySearch;
impl Strategy for RangeTo<u32> type Value = BinarySearch;
impl Strategy for proptest::num::u64::Any type Value = BinarySearch;
impl Strategy for Range<u64> type Value = BinarySearch;
impl Strategy for RangeFrom<u64> type Value = BinarySearch;
impl Strategy for RangeTo<u64> type Value = BinarySearch;
impl Strategy for proptest::num::usize::Any type Value = BinarySearch;
impl Strategy for Range<usize> type Value = BinarySearch;
impl Strategy for RangeFrom<usize> type Value = BinarySearch;
impl Strategy for RangeTo<usize> type Value = BinarySearch;
impl Strategy for proptest::num::f32::Any type Value = BinarySearch;
impl Strategy for Range<f32> type Value = BinarySearch;
impl Strategy for RangeFrom<f32> type Value = BinarySearch;
impl Strategy for RangeTo<f32> type Value = BinarySearch;
impl Strategy for proptest::num::f64::Any type Value = BinarySearch;
impl Strategy for Range<f64> type Value = BinarySearch;
impl Strategy for RangeFrom<f64> type Value = BinarySearch;
impl Strategy for RangeTo<f64> type Value = BinarySearch;
impl<T: BitSetLike> Strategy for BitSetStrategy<T> type Value = BitSetValueTree<T>;
impl<A: Strategy> Strategy for (A,) type Value = TupleValueTree<(A::Value,)>;
impl<A: Strategy, B: Strategy> Strategy for (A, B) type Value = TupleValueTree<(A::Value, B::Value)>;
impl<A: Strategy, B: Strategy, C: Strategy> Strategy for (A, B, C) type Value = TupleValueTree<(A::Value, B::Value, C::Value)>;
impl<A: Strategy, B: Strategy, C: Strategy, D: Strategy> Strategy for (A, B, C, D) type Value = TupleValueTree<(A::Value, B::Value, C::Value, D::Value)>;
impl<A: Strategy, B: Strategy, C: Strategy, D: Strategy, E: Strategy> Strategy for (A, B, C, D, E) type Value = TupleValueTree<(A::Value, B::Value, C::Value, D::Value, E::Value)>;
impl<A: Strategy, B: Strategy, C: Strategy, D: Strategy, E: Strategy, F: Strategy> Strategy for (A, B, C, D, E, F) type Value = TupleValueTree<(A::Value, B::Value, C::Value, D::Value, E::Value, F::Value)>;
impl<A: Strategy, B: Strategy, C: Strategy, D: Strategy, E: Strategy, F: Strategy, G: Strategy> Strategy for (A, B, C, D, E, F, G) type Value = TupleValueTree<(A::Value, B::Value, C::Value, D::Value, E::Value, F::Value, G::Value)>;
impl<A: Strategy, B: Strategy, C: Strategy, D: Strategy, E: Strategy, F: Strategy, G: Strategy, H: Strategy> Strategy for (A, B, C, D, E, F, G, H) type Value = TupleValueTree<(A::Value, B::Value, C::Value, D::Value, E::Value, F::Value, G::Value, H::Value)>;
impl<A: Strategy, B: Strategy, C: Strategy, D: Strategy, E: Strategy, F: Strategy, G: Strategy, H: Strategy, I: Strategy> Strategy for (A, B, C, D, E, F, G, H, I) type Value = TupleValueTree<(A::Value, B::Value, C::Value, D::Value, E::Value, F::Value, G::Value, H::Value, I::Value)>;
impl<A: Strategy, B: Strategy, C: Strategy, D: Strategy, E: Strategy, F: Strategy, G: Strategy, H: Strategy, I: Strategy, J: Strategy> Strategy for (A, B, C, D, E, F, G, H, I, J) type Value = TupleValueTree<(A::Value, B::Value, C::Value, D::Value, E::Value, F::Value, G::Value, H::Value, I::Value, J::Value)>;
impl<S: Strategy> Strategy for [S; 1] type Value = ArrayValueTree<[S::Value; 1]>;
impl<S: Strategy> Strategy for [S; 2] type Value = ArrayValueTree<[S::Value; 2]>;
impl<S: Strategy> Strategy for [S; 3] type Value = ArrayValueTree<[S::Value; 3]>;
impl<S: Strategy> Strategy for [S; 4] type Value = ArrayValueTree<[S::Value; 4]>;
impl<S: Strategy> Strategy for [S; 5] type Value = ArrayValueTree<[S::Value; 5]>;
impl<S: Strategy> Strategy for [S; 6] type Value = ArrayValueTree<[S::Value; 6]>;
impl<S: Strategy> Strategy for [S; 7] type Value = ArrayValueTree<[S::Value; 7]>;
impl<S: Strategy> Strategy for [S; 8] type Value = ArrayValueTree<[S::Value; 8]>;
impl<S: Strategy> Strategy for [S; 9] type Value = ArrayValueTree<[S::Value; 9]>;
impl<S: Strategy> Strategy for [S; 10] type Value = ArrayValueTree<[S::Value; 10]>;
impl<S: Strategy> Strategy for [S; 11] type Value = ArrayValueTree<[S::Value; 11]>;
impl<S: Strategy> Strategy for [S; 12] type Value = ArrayValueTree<[S::Value; 12]>;
impl<S: Strategy> Strategy for [S; 13] type Value = ArrayValueTree<[S::Value; 13]>;
impl<S: Strategy> Strategy for [S; 14] type Value = ArrayValueTree<[S::Value; 14]>;
impl<S: Strategy> Strategy for [S; 15] type Value = ArrayValueTree<[S::Value; 15]>;
impl<S: Strategy> Strategy for [S; 16] type Value = ArrayValueTree<[S::Value; 16]>;
impl<S: Strategy> Strategy for [S; 17] type Value = ArrayValueTree<[S::Value; 17]>;
impl<S: Strategy> Strategy for [S; 18] type Value = ArrayValueTree<[S::Value; 18]>;
impl<S: Strategy> Strategy for [S; 19] type Value = ArrayValueTree<[S::Value; 19]>;
impl<S: Strategy> Strategy for [S; 20] type Value = ArrayValueTree<[S::Value; 20]>;
impl<S: Strategy> Strategy for [S; 21] type Value = ArrayValueTree<[S::Value; 21]>;
impl<S: Strategy> Strategy for [S; 22] type Value = ArrayValueTree<[S::Value; 22]>;
impl<S: Strategy> Strategy for [S; 23] type Value = ArrayValueTree<[S::Value; 23]>;
impl<S: Strategy> Strategy for [S; 24] type Value = ArrayValueTree<[S::Value; 24]>;
impl<S: Strategy> Strategy for [S; 25] type Value = ArrayValueTree<[S::Value; 25]>;
impl<S: Strategy> Strategy for [S; 26] type Value = ArrayValueTree<[S::Value; 26]>;
impl<S: Strategy> Strategy for [S; 27] type Value = ArrayValueTree<[S::Value; 27]>;
impl<S: Strategy> Strategy for [S; 28] type Value = ArrayValueTree<[S::Value; 28]>;
impl<S: Strategy> Strategy for [S; 29] type Value = ArrayValueTree<[S::Value; 29]>;
impl<S: Strategy> Strategy for [S; 30] type Value = ArrayValueTree<[S::Value; 30]>;
impl<S: Strategy> Strategy for [S; 31] type Value = ArrayValueTree<[S::Value; 31]>;
impl<S: Strategy> Strategy for [S; 32] type Value = ArrayValueTree<[S::Value; 32]>;
impl<T> Strategy for VecDequeStrategy<T> where
T: Strategy, type Value = VecDequeValueTree<T::Value>;impl<T> Strategy for LinkedListStrategy<T> where
T: Strategy, type Value = LinkedListValueTree<T::Value>;impl<T> Strategy for BinaryHeapStrategy<T> where
T: Strategy,
<T::Value as ValueTree>::Value: Ord, type Value = BinaryHeapValueTree<T::Value>;impl<T> Strategy for HashSetStrategy<T> where
T: Strategy,
<T::Value as ValueTree>::Value: Hash + Eq, type Value = HashSetValueTree<T::Value>;impl<T> Strategy for BTreeSetStrategy<T> where
T: Strategy,
<T::Value as ValueTree>::Value: Ord, type Value = BTreeSetValueTree<T::Value>;impl<K, V> Strategy for HashMapStrategy<K, V> where
K: Strategy,
V: Strategy,
<K::Value as ValueTree>::Value: Hash + Eq, type Value = HashMapValueTree<K::Value, V::Value>;impl<K, V> Strategy for BTreeMapStrategy<K, V> where
K: Strategy,
V: Strategy,
<K::Value as ValueTree>::Value: Ord, type Value = BTreeMapValueTree<K::Value, V::Value>;impl<T: Strategy> Strategy for VecStrategy<T> type Value = VecValueTree<T::Value>;
impl<'a> Strategy for CharStrategy<'a> type Value = CharValueTree;
impl<T> Strategy for RegexGeneratorStrategy<T> where
T: Debug, type Value = RegexGeneratorValueTree<T>;impl Strategy for str type Value = RegexGeneratorValueTree<String>;
impl<T> Strategy for OptionStrategy<T> where
T: Strategy, type Value = OptionValueTree<T::Value>;impl<T, E> Strategy for MaybeOk<T, E> where
T: Strategy,
E: Strategy, type Value = MaybeOkValueTree<T::Value, E::Value>;impl<T, E> Strategy for MaybeErr<T, E> where
T: Strategy,
E: Strategy, type Value = MaybeErrValueTree<T::Value, E::Value>;