Stateful_gen.Default
include Monad.S
include Applicative.S
val return : 'a -> 'a t
Inject the given value.
type 'a m = 'a Identity.t
val bool : bool t
Generate a bool
.
val nat_less_than : int -> int t
Generate a nat
smaller than the given value.
val small_int : int t
Generate a small int
.
Run a predetermined generator for each element in a list, and combine the result with the list element.
See traverse
for a more general form.
val oneof : 'a t Non_empty.t -> 'a t
Return a generator that picks and invokes one of the given generators, uniformly distributed.
val char_readable : char t
Generate a readable character.
val string_readable : string t
Generate a readable string.
Convert a QCheck_extra
generator to a QCheck
generator.
The QCheck generator is run once once and the result is used as the seed of the given generator.
Warning Because Stdlib.Random.Gen
and QCheck.Gen
have mutable state, you must make sure this is only called once, to get predictable results.