Generators Module
Helpers for building FsCheck generators used by Testify property checks.
Functions and values
| Function or value |
Description
|
|
|
|
|
Full Usage:
Generators.elements values
Parameters:
'T seq
-
The candidate values that the generator may choose from.
Returns: Gen<'T>
A generator that yields one value from values on each run.
|
Creates a generator that chooses from a fixed sequence of values.
Example
val weekendGen: obj
|
Full Usage:
Generators.from
Returns: Gen<'T>
The resolved generator for 'T from CheckConfig.defaultConfig.
|
Looks up the generator for a type from the neutral
Example
val intGen: obj
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int |
|
|
|
|
|
|
|
|
|
Creates a fixed-length list generator from an explicit arbitrary.
Example
val wordGen: obj
Multiple items
val char: value: 'T -> char (requires member op_Explicit) -------------------- type char = System.Char |
|
|
|
|
|
|
|
|
|
Combines two generators into a generator of pairs.
Example
val pairGen: obj
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int Multiple items
val string: value: 'T -> string -------------------- type string = System.String |
Full Usage:
Generators.tuple3 generator1 generator2 generator3
Parameters:
Gen<'T1>
-
The generator for the first tuple component.
generator2 : Gen<'T2>
-
The generator for the second tuple component.
generator3 : Gen<'T3>
-
The generator for the third tuple component.
Returns: Gen<'T1 * 'T2 * 'T3>
A generator that produces triples by sampling all three input generators.
|
Combines three generators into a generator of triples.
|
testify