Module suppositions::generators
[−]
[src]
This module describes how data gets generated from the underlying representation
in the suppositions::data
module.
Structs
Traits
Generator |
An object that can generate test data from an underlying data source. |
Functions
booleans |
Generates boolean value with a 50% chance of being true. |
collections |
Generates a collection of the given type, populated with elements from the item generator. |
consts |
Always generates a clone of the given value. |
f32s |
Generates values that encompass all possible float values (positive and negative), including NaN, and sub-normal values. |
f64s |
Generates values that encompass all possible float values (positive and negative), including NaN, and sub-normal values. |
find_minimal |
Find the smalltest |
i16s |
A generator that generates the full range of the specified type. |
i32s |
A generator that generates the full range of the specified type. |
i64s |
A generator that generates the full range of the specified type. |
i8s |
A generator that generates the full range of the specified type. |
info_pools |
Randomly generates an info-pool (mostly used for testing generators). |
isizes |
A generator that generates the full range of the specified type. |
one_of |
Allows the user to use one of a set of alternative generators. Often useful when you need to generate elements of an enum. |
optional |
Generates an Optional<_> value with a 50% chance of |
result |
Generates either an okay value from |
u16s |
A generator that generates integers of the specified type. |
u32s |
A generator that generates integers of the specified type. |
u64s |
A generator that generates integers of the specified type. |
u8s |
A generator that generates integers of the specified type. |
uniform_f32s |
Generates values that are uniformly distributed, such that the output value x satisifes 0.0 <= x < 1.0 |
uniform_f64s |
Generates values that are uniformly distributed, such that the output value x satisifes 0.0 <= x < 1.0 |
usizes |
A generator that generates integers of the specified type. |
vecs |
Generates vectors with items given by |
weighted_coin |
Generates a boolean with the specified probability (0.0 <= p <= 1.0) of being true. |