Arbitraries Module
Helpers for assembling custom FsCheck arbitraries used by Testify checks.
Functions and values
| Function or value |
Description
|
|
|
Full Usage:
Arbitraries.convert toValue fromValue arbitrary
Parameters:
'T1 -> 'T2
-
Converts source arbitrary values into the target representation.
fromValue : 'T2 -> 'T1
-
Converts target values back to the source representation for shrinking.
arbitrary : Arbitrary<'T1>
-
The source arbitrary.
Returns: Arbitrary<'T2>
A mapped arbitrary for the target type.
|
Maps an arbitrary from one type to another using reversible conversion functions.
|
|
|
Full Usage:
Arbitraries.from
Returns: Arbitrary<'T>
The resolved arbitrary for 'T from CheckConfig.defaultConfig.
|
Looks up the arbitrary for a type from the neutral
Example
val intArb: obj
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int |
|
|
|
Creates an arbitrary from a generator without a custom shrinker.
Example
val digitArb: obj
|
|
|
|
|
|
|
|
|
|
|
|
Builds an arbitrary that generates and shrinks pairs from two arbitraries.
Example
val pairArb: 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:
Arbitraries.tuple3 arbitrary1 arbitrary2 arbitrary3
Parameters:
Arbitrary<'T1>
-
The arbitrary for the first tuple component.
arbitrary2 : Arbitrary<'T2>
-
The arbitrary for the second tuple component.
arbitrary3 : Arbitrary<'T3>
-
The arbitrary for the third tuple component.
Returns: Arbitrary<'T1 * 'T2 * 'T3>
An arbitrary that generates and shrinks triples.
|
Builds an arbitrary that generates and shrinks triples from three arbitraries.
|
testify