Index of values

( and* ) [QCheck2.Gen]
( and* ) [QCheck.Iter]
( and* ) [QCheck.Gen]
( let* ) [QCheck2.Gen]
( let* ) [QCheck.Iter]
( let* ) [QCheck.Gen]
(--) [QCheck2.Gen]

a -- b is an alias for int_range a b.

(--) [QCheck.Gen]

Synonym for QCheck.Gen.int_range.

(--) [QCheck]

Synonym for QCheck.int_range.

(--.) [QCheck2.Gen]

a --. b is an alias for float_range ~origin:a a b.

(--.) [QCheck.Gen]

Synonym for float_range

(<$>) [QCheck2.Gen]

An infix synonym for QCheck2.Gen.map

(<$>) [QCheck.Gen]

An infix synonym for QCheck.Gen.map

(<*>) [QCheck2.Gen]

Synonym for QCheck2.Gen.ap

(<*>) [QCheck.Iter]
(<*>) [QCheck.Gen]

Infix operator for composing a function generator and an argument generator into a result generator.

(<+>) [QCheck.Iter]

Synonym for QCheck.Iter.append.

(==>) [QCheck2]

b1 ==> b2 is the logical implication b1 => b2 ie not b1 || b2 (except that it is strict and will interact better with QCheck2.Test.check_exn and the likes, because they will know the precondition was not satisfied.).

(==>) [QCheck]

b1 ==> b2 is the logical implication b1 => b2 ie not b1 || b2 (except that it is strict and will interact better with QCheck.Test.check_exn and the likes, because they will know the precondition was not satisfied.).

(>:::) [QCheck_ounit]

Same as OUnit.(>:::) but with a list of QCheck2 tests

(>>=) [QCheck2.Gen]

Synonym for QCheck2.Gen.bind

(>>=) [QCheck.Iter]
(>>=) [QCheck.Gen]

Monadic bind for writing dependent generators.

(>|=) [QCheck2.Gen]

An infix synonym for QCheck2.Gen.map.

(>|=) [QCheck.Iter]
(>|=) [QCheck.Gen]

An infix synonym for QCheck.Gen.map.

(@->) [QCheck2.Tuple.Infix]
(@->) [QCheck.Tuple.Infix]

Alias to B_cons.

(@::) [QCheck2.Tuple.Infix]

Alias for QCheck2.Tuple.cons.

(@::) [QCheck.Tuple.Infix]

Alias to QCheck.Tuple.cons.

A
add [QCheck2.Shrink.Number]
add_shrink_invariant [QCheck2.Gen]

add_shrink_invariant f gen returns a generator similar to gen except all shrinks satisfy f.

add_shrink_invariant [QCheck]

Update shrinker by only keeping smaller values satisfying the given invariant.

add_stat [QCheck]

Add a statistic to the arbitrary instance.

always [QCheck]

Always return the same element.

and+ [QCheck2.Gen]
and+ [QCheck.Iter]
and+ [QCheck.Gen]
ap [QCheck2.Gen]

ap fgen gen composes a function generator and an argument generator into a result generator.

append [QCheck.Iter]
append_l [QCheck.Iter]
apply [QCheck2.Fn]

apply f returns the underlying function to be used in tests.

apply [QCheck.Fn]
array [QCheck2.Observable]

array o wraps the observable o of 'a into an observable of 'a array.

array [QCheck2.Print]

array p is a printer of array, using p for each element.

array [QCheck2.Gen]

Builds an array generator from an element generator.

array [QCheck.Observable]
array [QCheck.Shrink]

Shrink an array.

array [QCheck.Print]

Array printer.

array [QCheck.Gen]

Builds an array generator from an element generator.

array [QCheck]

Generates arrays with length generated by QCheck.Gen.nat.

array_of_size [QCheck]

Generates arrays with length from the given distribution.

array_repeat [QCheck2.Gen]

array_repeat i g builds an array generator from exactly i elements generated by g.

array_repeat [QCheck.Gen]

array_repeat i g builds an array generator from exactly i elements generated by g.

array_size [QCheck2.Gen]

Builds an array generator from a (non-negative) size generator and an element generator.

array_size [QCheck.Gen]

Builds an array generator from a (non-negative) size generator and an element generator.

array_subset [QCheck.Gen]

array_subset k arr generates a sub-array of k elements at distinct positions in the input array arr, in the same order.

assume [QCheck2]

assume cond checks the precondition cond, and does nothing if cond=true.

assume [QCheck]

assume cond checks the precondition cond, and does nothing if cond=true.

assume_fail [QCheck2]

assume_fail () is like assume false, but can take any type since we know it always fails (like assert false).

assume_fail [QCheck]

assume_fail () is like assume false, but can take any type since we know it always fails (like assert false).

B
big_nat [QCheck2.Gen]

Generates natural numbers, possibly large (< 1_000_000).

big_nat [QCheck.Gen]

Generates natural numbers, possibly large.

bind [QCheck2.Gen]

bind gen f first generates a value of type 'a with gen and then passes it to f to generate a value of type 'b.

bool [QCheck2.Observable]

bool is an observable of bool.

bool [QCheck2.Print]

bool is a printer of boolean.

bool [QCheck2.Gen]

The boolean generator.

bool [QCheck.Observable]
bool [QCheck.Print]

Boolean printer.

bool [QCheck.Gen]

The boolean generator.

bool [QCheck]

Uniform boolean generator.

bytes [QCheck2.Observable]

bytes is an observable of bytes.

bytes [QCheck2.Print]

bytes is a printer of bytes.

bytes [QCheck2.Gen]

Bytes generator using the QCheck2.Gen.char character generator.

bytes [QCheck.Observable]
bytes [QCheck.Shrink]
bytes [QCheck.Print]

Bytes printer.

bytes [QCheck.Gen]

Builds a bytes generator.

bytes [QCheck]

Generates bytes with a distribution of length of QCheck.Gen.nat and distribution of characters of char.

bytes_gen_of_size [QCheck]

Builds a bytes generator from a (non-negative) size generator and a character generator.

bytes_of [QCheck2.Gen]

Builds a bytes generator using the given character generator.

bytes_of [QCheck.Gen]

Builds a bytes generator using the given character generator.

bytes_of [QCheck]

Generates bytes with a distribution of length of QCheck.Gen.nat.

bytes_of_size [QCheck]

Generates bytes with distribution of characters of char.

bytes_printable [QCheck2.Gen]

Generator using the QCheck2.Gen.printable character generator.

bytes_printable [QCheck.Gen]

Generator using the QCheck.Gen.printable character generator.

bytes_printable [QCheck]

Generates bytes with a distribution of length of QCheck.Gen.nat and distribution of characters of printable_char.

bytes_size [QCheck2.Gen]

Builds a bytes generator from a (non-negative) size generator.

bytes_size [QCheck.Gen]

Builds a bytes generator from a (non-negative) size generator.

bytes_small [QCheck2.Gen]

Builds a bytes generator using the QCheck2.Gen.char character generator, length is QCheck2.Gen.small_nat.

bytes_small [QCheck.Gen]

Builds a bytes generator using the QCheck.Gen.char character generator, length is QCheck.Gen.small_nat

bytes_small [QCheck]

Same as QCheck.bytes but with a small length (ie QCheck.Gen.small_nat ).

bytes_small_of [QCheck2.Gen]

Builds a bytes generator using the given character generator, length is QCheck2.Gen.small_nat.

bytes_small_of [QCheck.Gen]

Builds a bytes generator using the given character generator, length is QCheck.Gen.small_nat.

bytes_small_of [QCheck]

Same as QCheck.bytes_of but with a small length (ie QCheck.Gen.small_nat ).

C
callback [QCheck_base_runner.Raw]
char [QCheck2.Observable]

char is an observable of char.

char [QCheck2.Print]

char is a printer of character.

char [QCheck2.Gen]

Generates characters in the 0..255 range.

char [QCheck.Observable]
char [QCheck.Shrink]

Shrinks towards 'a'.

char [QCheck.Print]

Character printer.

char [QCheck.Gen]

Generates characters upto character code 255.

char [QCheck]

Uniformly distributed on all the chars (not just ascii or valid latin-1).

char_numeral [QCheck.Shrink]

Shrinks towards '0'.

char_printable [QCheck.Shrink]

Shrinks towards 'a' like !char.

char_range [QCheck2.Gen]

char_range ?origin low high generates chars between low and high, inclusive.

char_range [QCheck.Gen]

Generates chars between the two bounds, inclusive.

check_cell [QCheck2.Test]

check_cell ~long ~rand test generates up to count random values of type 'a using Gen.t and the random state st.

check_cell [QCheck.Test]
check_cell_exn [QCheck2.Test]

Same as QCheck2.Test.check_cell but calls QCheck2.Test.check_result on the result.

check_cell_exn [QCheck.Test]
check_exn [QCheck2.Test]

Checks the property against some test cases, and calls QCheck2.Test.check_result, which might raise an exception in case of failure.

check_exn [QCheck.Test]
check_result [QCheck2.Test]

check_result cell res checks that res is Ok _, and returns unit.

children [QCheck2.Tree]

children tree returns the direct sub-trees of the tree of generated values t.

choose [QCheck]

Choose among the given list of generators.

collect [QCheck2.TestResult]

Obtain statistics

collect [QCheck.TestResult]

Obtain statistics

comap [QCheck2.Print]
comap [QCheck.Print]

comap f p maps p, a printer of type 'b, to a printer of type 'a by first converting a printed value using f : 'a -> 'b.

cons [QCheck2.Tuple]

cons is Cons.

cons [QCheck.Tuple]
contramap [QCheck2.Observable]

contramap f o maps the function f on observable o.

contramap [QCheck2.Print]

contramap f p transforms printer p into another using f.

D
debug_shrinking_choices [QCheck_base_runner]

The function used by the default handler to debug shrinking choices.

default_handler [QCheck_base_runner]

The default handler used.

delay [QCheck2.Gen]

Delay execution of some code until the generator is actually called.

delay [QCheck.Gen]

Delay execution of some code until the generator is actually called.

div [QCheck2.Shrink.Number]
E
empty [QCheck.Iter]
equal [QCheck2.Observable]

equal o returns the equality function of o.

equal [QCheck2.Shrink.Number]
equal [QCheck.Observable]
F
fail_report [QCheck2.Test]

Fail the test with some additional message that will be reported.

fail_report [QCheck.Test]

Fail the test with some additional message that will be reported.

fail_reportf [QCheck2.Test]

Format version of QCheck2.Test.fail_report.

fail_reportf [QCheck.Test]

Format version of QCheck.Test.fail_report

filter [QCheck.Shrink]

filter f shrink shrinks values the same as shrink, but only keep smaller values that satisfy f.

filter [QCheck.Iter]
find [QCheck.Iter]
find_example [QCheck2]

find_example ~f gen uses gen to generate some values of type 'a, and checks them against f.

find_example [QCheck]

find_example ~f gen uses gen to generate some values of type 'a, and checks them against f.

find_example_gen [QCheck2]

Toplevel version of QCheck2.find_example.

find_example_gen [QCheck]

Toplevel version of QCheck.find_example.

fix [QCheck2.Gen]

Parametrized fixpoint combinator for generating recursive values.

fix [QCheck.Gen]

Parametrized fixpoint combinator for generating recursive values.

flatten [QCheck.Iter]
flatten_a [QCheck2.Gen]

Generate an array of elements from individual generators.

flatten_a [QCheck.Gen]

Generate an array of elements from individual generators

flatten_l [QCheck2.Gen]

Generate a list of elements from individual generators.

flatten_l [QCheck.Gen]

Generate a list of elements from individual generators

flatten_opt [QCheck2.Gen]

Generate an option from an optional generator.

flatten_opt [QCheck.Gen]

Generate an option from an optional generator

flatten_res [QCheck2.Gen]

Generate a result from Ok gen, an error from Error e.

flatten_res [QCheck.Gen]

Generate a result from Ok g, an error from Error e

float [QCheck2.Observable]

float is an observable of float.

float [QCheck2.Print]

float is a printer of float.

float [QCheck2.Gen]

Generates floating point numbers.

float [QCheck.Observable]
float [QCheck.Print]

Floating point number printer.

float [QCheck.Gen]

Generates floating point numbers.

float [QCheck]

Generates regular floats (no nan and no infinities).

float_bound_exclusive [QCheck2.Gen]

float_bound_exclusive origin bound returns a random floating-point number between 0. and bound (exclusive).

float_bound_exclusive [QCheck.Gen]

float_bound_exclusive bound returns a random floating-point number between 0 and bound (exclusive).

float_bound_exclusive [QCheck]

float_bound_exclusive n is uniform between 0 included and n excluded.

float_bound_inclusive [QCheck2.Gen]

float_bound_inclusive ?origin bound returns a random floating-point number between 0. and bound (inclusive).

float_bound_inclusive [QCheck.Gen]

float_bound_inclusive bound returns a random floating-point number between 0 and bound (inclusive).

float_bound_inclusive [QCheck]

float_bound_inclusive n is uniform between 0 and n included.

float_range [QCheck2.Gen]

float_range ?origin low high generates floating-point numbers within low and high (inclusive).

float_range [QCheck.Gen]

float_range low high generates floating-point numbers within low and high (inclusive)

float_range [QCheck]

float_range low high is uniform between low included and high included.

float_towards [QCheck2.Shrink]

QCheck2.Shrink.number_towards specialized to float.

frequency [QCheck2.Gen]

Constructs a generator that selects among a given list of generators.

frequency [QCheck.Gen]

Constructs a generator that selects among a given list of generators.

frequency [QCheck]

Similar to QCheck.oneof but with frequencies.

frequencya [QCheck2.Gen]

Constructs a generator that selects among a given array of values.

frequencya [QCheck.Gen]

Constructs a generator that selects among a given array of values.

frequencya [QCheck]

Same as QCheck.frequencyl, but with an array.

frequencyl [QCheck2.Gen]

Constructs a generator that selects among a given list of values.

frequencyl [QCheck.Gen]

Constructs a generator that selects among a given list of values.

frequencyl [QCheck]

Same as QCheck.oneofl, but each element is paired with its frequency in the probability distribution (the higher, the more likely).

fun1 [QCheck2]

fun1 obs gen generates random functions that take an argument observable via obs and map to random values generated with gen.

fun1 [QCheck]

fun1 o ret makes random functions that take an argument observable via o and map to random values generated from ret.

fun1_unsafe [QCheck]

Generator of functions of arity 1.

fun2 [QCheck2]

Specialized version of QCheck2.fun_nary for functions of 2 arguments, for convenience.

fun2 [QCheck]
fun2_unsafe [QCheck]

Generator of functions of arity 2.

fun3 [QCheck2]

Specialized version of QCheck2.fun_nary for functions of 3 arguments, for convenience.

fun3 [QCheck]
fun4 [QCheck2]

Specialized version of QCheck2.fun_nary for functions of 4 arguments, for convenience.

fun4 [QCheck]
fun_nary [QCheck2]

fun_nary tuple_obs gen generates random n-ary functions.

fun_nary [QCheck]

fun_nary makes random n-ary functions.

G
gen [QCheck]

Access the underlying random generator of this arbitrary object.

generate [QCheck2.Gen]

generate ~n gen generates n values using gen (shrinks are discarded).

generate [QCheck.Gen]

generate ~n g generates n instances of g.

generate1 [QCheck2.Gen]

generate1 gen generates one instance of gen (shrinks are discarded).

generate1 [QCheck.Gen]

generate1 g generates one instance of g.

generate_tree [QCheck2.Gen]

generate_tree ?rand gen generates a random value and its shrinks using gen.

get_collect [QCheck2.TestResult]

get_collect t returns the repartition of generated values.

get_collect_opt [QCheck2.Test]
get_count [QCheck2.Test]

Get the count of a cell.

get_count [QCheck2.TestResult]

get_count t returns the number of tests executed.

get_count [QCheck.Test]

Get the count of a cell.

get_count [QCheck.TestResult]

Get the count of a cell.

get_count_gen [QCheck2.TestResult]

get_count_gen t returns the number of generated cases.

get_count_gen [QCheck.TestResult]
get_gen [QCheck2.Test]
get_gen [QCheck]

Access the underlying random generator of this arbitrary object.

get_instances [QCheck2.TestResult]

get_instances t returns the generated instances, with no guarantee on the order.

get_law [QCheck2.Test]
get_law [QCheck.Test]
get_long_factor [QCheck2.Test]

Get the long factor of a cell.

get_long_factor [QCheck.Test]

Get the long factor of a cell.

get_name [QCheck2.Test]
get_name [QCheck.Test]
get_positive [QCheck2.Test]

Get the expected mode of a cell: positive indicates expected to satisfy the tested property, negative indicates expected not to satisfy the tested property.

get_print [QCheck]
get_print_opt [QCheck2.Test]
get_state [QCheck2.TestResult]

get_state t returns the final state after a test execution.

get_state [QCheck.TestResult]
get_stats [QCheck2.Test]
get_stats [QCheck2.TestResult]

get_stats t returns the statistics captured by the test.

get_time_between_msg [QCheck_base_runner]

Get the minimum time to wait between printing messages.

get_warnings [QCheck2.TestResult]

get_warnings t returns the list of warnings emitted during the test.

graft_corners [QCheck2.Gen]

graft_corners gen l () makes a new generator that enumerates the corner cases in l and then behaves like g.

graft_corners [QCheck.Gen]

graft_corners gen l () makes a new generator that enumerates the corner cases in l and then behaves like g.

H
hash [QCheck2.Observable]

hash o returns the hashing function of o.

hash [QCheck.Observable]
I
int [QCheck2.Observable]

int is an observable of int.

int [QCheck2.Print]

int is a printer of integer.

int [QCheck2.Gen]

Generates integers uniformly.

int [QCheck.Observable]
int [QCheck.Shrink]
int [QCheck.Print]

Integer printer.

int [QCheck.Gen]

Generates integers uniformly.

int [QCheck]

Int generator.

int32 [QCheck2.Gen]

Generates uniform QCheck2.Gen.int32 values.

int32 [QCheck.Shrink]
int32 [QCheck]

Int32 generator.

int32_towards [QCheck2.Shrink]

QCheck2.Shrink.number_towards specialized to int32.

int64 [QCheck2.Gen]

Generates uniform QCheck2.Gen.int64 values.

int64 [QCheck.Shrink]
int64 [QCheck]

Int64 generator.

int64_towards [QCheck2.Shrink]

QCheck2.Shrink.number_towards specialized to int64.

int_aggressive [QCheck2.Shrink]
int_aggressive [QCheck.Shrink]

Shrink integers by trying all smaller integers (can take a lot of time!)

int_aggressive_towards [QCheck2.Shrink]

int_agressive_towards destination n gives all integers from destination to n (excluded).

int_bound [QCheck2.Gen]

Uniform integer generator producing integers within 0..bound.

int_bound [QCheck.Gen]

Uniform integer generator producing integers between 0 and bound (inclusive).

int_bound [QCheck]

int_bound n is uniform between 0 and n included.

int_corners [QCheck2.Gen]

All corner cases for int.

int_corners [QCheck.Gen]

All corner cases for int.

int_pos_corners [QCheck2.Gen]

Non-negative corner cases for int.

int_pos_corners [QCheck.Gen]

Non-negative corner cases for int.

int_range [QCheck2.Gen]

int_range ?origin low high is an uniform integer generator producing integers within low..high (inclusive).

int_range [QCheck.Gen]

Uniform integer generator producing integers within low,high (inclusive).

int_range [QCheck]

int_range a b is uniform between a and b included.

int_towards [QCheck2.Shrink]

QCheck2.Shrink.number_towards specialized to int.

is_failed [QCheck2.TestResult]

Returns true iff the state is Failed _

is_success [QCheck2.TestResult]

Returns true iff the state is Success

is_success [QCheck.TestResult]

Returns true iff the state if Success

J
join [QCheck2.Gen]

Collapses a generator of generators to a generator.

join [QCheck.Gen]

Collapses a generator of generators to simply a generator.

L
let+ [QCheck2.Gen]
let+ [QCheck.Iter]
let+ [QCheck.Gen]
list [QCheck2.Observable]

list o wraps the observable o of 'a into an observable of 'a list.

list [QCheck2.Print]

list p is a printer of list, using p for each element.

list [QCheck2.Gen]

Builds a list generator from an element generator.

list [QCheck.Observable]
list [QCheck.Shrink]

Try to shrink lists by removing one or more elements.

list [QCheck.Print]

List printer.

list [QCheck.Gen]

Builds a list generator from an element generator.

list [QCheck]

Generates lists with length generated by QCheck.Gen.nat.

list_elems [QCheck.Shrink]

Shrinks the elements of a list, without changing the list size.

list_of_size [QCheck]

Generates lists with length from the given distribution.

list_repeat [QCheck2.Gen]

list_repeat i g builds a list generator from exactly i elements generated by g.

list_repeat [QCheck.Gen]

list_repeat i g builds a list generator from exactly i elements generated by g.

list_size [QCheck2.Gen]

Builds a list generator from a (non-negative) size generator and an element generator.

list_size [QCheck.Gen]

Builds a list generator from a (non-negative) size generator and an element generator.

list_spine [QCheck.Shrink]

Try to shrink lists by removing one or more elements.

long_tests [QCheck_base_runner]

Is the default mode to run long tests or nor?

M
make [QCheck2.Test]

make gen prop builds a test that checks property prop on instances of the generator gen.

make [QCheck2.Observable]

make ?eq ?hash print creates an observable of 'a.

make [QCheck.Test]

make arb prop builds a test that checks property prop on instances of the generator arb.

make [QCheck.Observable]
make [QCheck]

Builder for arbitrary.

make_cell [QCheck2.Test]

make_cell gen prop builds a test that checks property prop on instances of the generator gen.

make_cell [QCheck.Test]

make_cell arb prop builds a test that checks property prop on instances of the generator arb.

make_cell_from_QCheck1 [QCheck2.Test]

⚠️ Do not use, this is exposed for internal reasons only.

make_neg [QCheck2.Test]

make_neg gen prop builds a test that checks property prop on instances of the generator gen.

make_neg [QCheck.Test]

make_neg arb prop builds a test that checks property prop on instances of the generator arb.

make_primitive [QCheck2.Gen]

make_primitive ~gen ~shrink creates a generator from a function gen that creates a random value (this function must only use the given Random.State.t for randomness) and a function shrink that, given a value a, returns a lazy list of "smaller" values (used when a test fails).

map [QCheck2.Observable]
map [QCheck2.Gen]

map f gen transforms a generator gen by applying f to each generated element.

map [QCheck.Observable]
map [QCheck.Iter]
map [QCheck.Gen]

map f g transforms a generator g by applying f to each generated element.

map [QCheck]

map f a returns a new arbitrary instance that generates values using a#gen and then transforms them through f.

map2 [QCheck2.Gen]

map2 f gen1 gen2 transforms two generators gen1 and gen2 by applying f to each pair of generated elements.

map2 [QCheck.Iter]
map2 [QCheck.Gen]

map2 f g1 g2 transforms two generators g1 and g2 by applying f to each pair of generated elements.

map3 [QCheck2.Gen]

map3 f gen1 gen2 gen3 transforms three generators gen1, gen2, and gen3 by applying f to each triple of generated elements.

map3 [QCheck.Gen]

map3 f g1 g2 g3 transforms three generators g1, g2, and g3 by applying f to each triple of generated elements.

map_keep_input [QCheck.Gen]

map_keep_input f g transforms a generator g by applying f to each generated element.

map_keep_input [QCheck]

map_keep_input f a generates random values from a, and maps them into values of type 'b using the function f, but it also keeps the original value.

map_same_type [QCheck]

Specialization of map when the transformation preserves the type, which makes shrinker, printer, etc.

N
nat [QCheck2.Gen]

Generates natural numbers (< 10_000).

nat [QCheck.Gen]

Generates small natural numbers.

nat_split [QCheck.Gen]

nat_split ~size:k n generates k-sized arrays n1,n2,..nk of natural numbers in [0;n] with n1 + n2 + ... + nk = n.

nat_split2 [QCheck.Gen]

nat_split2 n generates pairs (n1, n2) of natural numbers with n1 + n2 = n.

neg_float [QCheck]

Negative float generator (no nan and no infinities).

neg_int [QCheck2.Gen]

Generates non-strictly negative integers (0 included).

neg_int [QCheck.Gen]

Generates non-strictly negative integers (0 included).

neg_int [QCheck]

Negative int generator (0 included, see QCheck.Gen.neg_int).

nfloat [QCheck2.Gen]

Generates negative floating point numbers.

nfloat [QCheck.Gen]

Generates negative floating point numbers.

nil [QCheck2.Tuple]

nil is Nil.

nil [QCheck.Tuple]
nil [QCheck.Shrink]

No shrink

no_shrink [QCheck2.Gen]

no_shrink gen returns a generator using gen but with shrinking disabled

number_towards [QCheck2.Shrink]

Shrink a number by edging towards a destination.

numeral [QCheck2.Gen]

Generates numeral characters '0'..'9'.

numeral [QCheck.Gen]

Generates numeral characters.

numeral_char [QCheck]

Uniformly distributed over '0'..'9'.

numeral_string [QCheck]

Generates strings with a distribution of length of QCheck.Gen.nat and distribution of characters of numeral_char.

numeral_string_of_size [QCheck]

Generates strings with a distribution of characters of numeral_char.

O
o_cons [QCheck2.Tuple]

o_cons is the QCheck2.Tuple.obs equivalent of QCheck2.Tuple.cons.

o_cons [QCheck.Tuple]
o_nil [QCheck2.Tuple]

o_nil is the QCheck2.Tuple.obs equivalent of QCheck2.Tuple.nil.

o_nil [QCheck.Tuple]
observable [QCheck2.Tuple]

observable obs returns the underlying observable of obs.

observable [QCheck.Tuple]
of_array [QCheck.Iter]
of_int [QCheck2.Shrink.Number]
of_list [QCheck.Iter]
oneof [QCheck2.Gen]

oneof l constructs a generator that selects among the given list of generators l.

oneof [QCheck.Gen]

Constructs a generator that selects among a given list of generators.

oneof [QCheck]

Pick a generator among the list, randomly.

oneofa [QCheck2.Gen]

oneofa a constructs a generator that selects among the given array of values a.

oneofa [QCheck.Gen]

Constructs a generator that selects among a given array of values.

oneofa [QCheck]

Pick an element randomly in the array.

oneofl [QCheck2.Gen]

oneofl l constructs a generator that selects among the given list of values l.

oneofl [QCheck.Gen]

Constructs a generator that selects among a given list of values.

oneofl [QCheck]

Pick an element randomly in the list.

opt [QCheck2.Gen]

opt is an alias of QCheck2.Gen.option for backward compatibility.

opt [QCheck.Gen]

opt is an alias of QCheck.Gen.option for backward compatibility.

option [QCheck2.Observable]

option o wraps the observable o of 'a into an observable of 'a option.

option [QCheck2.Print]

option p is a printer of 'a option, using p if it is a Some.

option [QCheck2.Gen]

option gen is an option generator that uses gen when generating Some values.

option [QCheck.Observable]
option [QCheck.Shrink]
option [QCheck.Print]

Option printer.

option [QCheck.Gen]

An option generator, with optional ratio.

option [QCheck]

Choose between returning Some random value with optional ratio, or None.

P
pair [QCheck2.Observable]

pair o1 o2 is an observable of pairs of ('a * 'b).

pair [QCheck2.Print]

pair p1 p2 is a printer of pair.

pair [QCheck2.Gen]

pair gen1 gen2 generates pairs.

pair [QCheck.Observable]
pair [QCheck.Shrink]

pair a b uses a to shrink the first element of tuples, then tries to shrink the second element using b.

pair [QCheck.Iter]
pair [QCheck.Print]

Pair printer.

pair [QCheck.Gen]

Generates pairs.

pair [QCheck]

Combines two generators into a generator of pairs.

parse_cli [QCheck_base_runner.Raw]
pfloat [QCheck2.Gen]

Generates positive floating point numbers (0. included).

pfloat [QCheck.Gen]

Generates positive floating point numbers (0.

pint [QCheck2.Gen]

Generates non-strictly positive integers uniformly (0 included).

pint [QCheck.Gen]

Generates non-strictly positive integers uniformly (0 included).

pos_float [QCheck]

Positive float generator (no nan and no infinities).

pos_int [QCheck]

Positive int generator (0 included).

pos_split [QCheck.Gen]

pos_split ~size:k n generates k-sized arrays n1,n2,..nk of strictly positive (non-zero) natural numbers with n1 + n2 + ... + nk = n.

pos_split2 [QCheck.Gen]

pos_split2 n generates pairs (n1, n2) of strictly positive (nonzero) natural numbers with n1 + n2 = n.

pp [QCheck2.Tree]

pp ?depth pp_a ppf tree pretty-prints the tree of generated values tree using the pretty-print formatter ppf.

pp_str_c [QCheck_base_runner.Color]
print [QCheck2.Fn]

print f prints the implementation of generated function f.

print [QCheck2.Observable]

print o returns the printing function of o.

print [QCheck.Fn]
print [QCheck.Observable]
print_c_ex [QCheck2.Test]
print_c_ex [QCheck.Test]
print_collect [QCheck2.Test]

Print "collect" results.

print_error [QCheck2.Test]
print_error [QCheck.Test]
print_expected_failure [QCheck2.Test]
print_fail [QCheck2.Test]
print_fail [QCheck.Test]
print_fail_other [QCheck2.Test]
print_fail_other [QCheck.Test]
print_instance [QCheck2.Test]
print_instance [QCheck.Test]
print_stat [QCheck2.Test]

Print statistics.

print_std [QCheck_base_runner.Raw]
print_test_error [QCheck2.Test]
print_test_error [QCheck.Test]
print_test_fail [QCheck2.Test]
print_test_fail [QCheck.Test]
printable [QCheck2.Gen]

Generates printable characters.

printable [QCheck.Gen]

Generates printable ascii characters - either '\n' or in the range 32 to 126, inclusive

printable_char [QCheck]

Uniformly distributed over a subset of printable ascii chars.

printable_string [QCheck]

Generates strings with a distribution of length of QCheck.Gen.nat and distribution of characters of printable_char.

printable_string_of_size [QCheck]

Generates strings with distribution of characters of printable_char.

pure [QCheck2.Gen]

pure a creates a generator that always returns a.

pure [QCheck.Gen]

Synonym for QCheck.Gen.return

Q
quad [QCheck2.Observable]

quad o1 o2 o3 o4 is an observable of quadruples of ('a * 'b * 'c * 'd).

quad [QCheck2.Print]

quad p1 p2 p3 p4 is a printer of quadruple.

quad [QCheck2.Gen]

quad gen1 gen2 gen3 gen4 generates quadruples.

quad [QCheck.Observable]
quad [QCheck.Shrink]

Similar to QCheck.Shrink.pair

quad [QCheck.Iter]
quad [QCheck.Print]

Quadruple (4-tuple) printer.

quad [QCheck.Gen]

Generates quadruples.

quad [QCheck]

Combines four generators into a generator of 4-tuples.

R
random_state [QCheck_base_runner]

Access the current random state

range_subset [QCheck.Gen]

range_subset ~size:k low high generates an array of length k of sorted distinct integers in the range low..high (included).

reset_line [QCheck_base_runner.Color]
return [QCheck2.Gen]

Synonym for QCheck2.Gen.pure

return [QCheck.Iter]
return [QCheck.Gen]

Create a constant generator.

root [QCheck2.Tree]

root tree returns the root value of the tree of generated values t.

run [QCheck_ounit]

run test runs the test, and returns an error code that is 0 if all tests passed, 1 otherwise.

run_tap [QCheck_ounit]

TAP-compatible test runner, in case we want to use a test harness.

run_tests [QCheck_base_runner]

Run a suite of tests, and print its results.

run_tests_main [QCheck_base_runner]

Can be used as the main function of a test file.

S
set_collect [QCheck]
set_gen [QCheck]

Change the generator

set_long_tests [QCheck_base_runner]

Change the value of long_tests ()

set_name [QCheck2.Test]
set_name [QCheck.Test]
set_print [QCheck]
set_seed [QCheck_base_runner]

Change the QCheck_base_runner.random_state by creating a new one, initialized with the given seed.

set_shrink [QCheck2.Gen]

set_shrink shrink gen sets the shrinker to shrink for gen.

set_shrink [QCheck]
set_small [QCheck]
set_stats [QCheck]
set_time_between_msg [QCheck_base_runner]

Set the minimum tiem between messages.

set_verbose [QCheck_base_runner]

Change the value of verbose ()

shrink [QCheck.Fn]
shuffle_a [QCheck2.Gen]

Returns a copy of the array with its elements shuffled.

shuffle_a [QCheck.Gen]

Shuffles the array in place.

shuffle_l [QCheck2.Gen]

Creates a generator of shuffled lists.

shuffle_l [QCheck.Gen]

Creates a generator of shuffled lists.

shuffle_w_l [QCheck2.Gen]

Creates a generator of weighted shuffled lists.

shuffle_w_l [QCheck.Gen]

Creates a generator of weighted shuffled lists.

sized [QCheck2.Gen]

Creates a generator from a size-bounded generator by first generating a size using QCheck2.Gen.nat and passing the result to the size-bounded generator.

sized [QCheck.Gen]

Creates a generator from a size-bounded generator by first generating a size using QCheck.Gen.nat and passing the result to the size-bounded generator.

sized_size [QCheck2.Gen]

Creates a generator from a size-bounded generator by first generating a size using the integer generator and passing the result to the size-bounded generator.

sized_size [QCheck.Gen]

Creates a generator from a size-bounded generator by first generating a size using the integer generator and passing the result to the size-bounded generator.

small_array [QCheck2.Gen]

Generates arrays of small size (see QCheck2.Gen.small_nat).

small_array [QCheck.Gen]

Generates arrays of small size (see QCheck.Gen.small_nat).

small_int [QCheck2.Gen]

Small UNSIGNED integers, for retrocompatibility.

small_int [QCheck.Gen]

Small UNSIGNED integers, for retrocompatibility.

small_int [QCheck]

Small unsigned integers.

small_int_corners [QCheck2.Gen]

As QCheck2.Gen.small_int, but each newly created generator starts with a list of corner cases before falling back on random generation.

small_int_corners [QCheck]

As small_int, but each newly created generator starts with a list of corner cases before falling back on random generation.

small_list [QCheck2.Gen]

Generates lists of small size (see QCheck2.Gen.small_nat).

small_list [QCheck.Gen]

Generates lists of small size (see QCheck.Gen.small_nat).

small_list [QCheck]

Generates lists of small size (see QCheck.Gen.small_nat).

small_nat [QCheck2.Gen]

Small positive integers (< 100, 0 included).

small_nat [QCheck.Gen]

Small integers (< 100)

small_nat [QCheck]

Small unsigned integers.

small_printable_string [QCheck]

Generates strings with a length of small_nat and distribution of characters of printable_char.

small_signed_int [QCheck2.Gen]

Small SIGNED integers, based on QCheck2.Gen.small_nat.

small_signed_int [QCheck.Gen]

Small SIGNED integers, based on QCheck.Gen.small_nat.

small_signed_int [QCheck]

Small signed integers.

small_string [QCheck2.Gen]

Builds a string generator, length is QCheck2.Gen.small_nat.

small_string [QCheck.Gen]

Builds a string generator, length is QCheck.Gen.small_nat Accepts an optional character generator (the default is QCheck.Gen.char).

small_string [QCheck]

Same as QCheck.string but with a small length (ie QCheck.Gen.small_nat ).

stats [QCheck2.TestResult]

Obtain statistics

stats [QCheck.TestResult]

Obtain statistics

string [QCheck2.Observable]

string is an observable of string.

string [QCheck2.Print]

string is a printer of string.

string [QCheck2.Gen]

Builds a string generator.

string [QCheck.Observable]
string [QCheck.Shrink]
string [QCheck.Print]

String printer.

string [QCheck.Gen]

Builds a string generator.

string [QCheck]

Generates strings with a distribution of length of QCheck.Gen.nat and distribution of characters of char.

string_gen [QCheck]

Generates strings with a distribution of length of QCheck.Gen.nat.

string_gen_of_size [QCheck]

Builds a string generator from a (non-negative) size generator and a character generator.

string_numeral [QCheck]

Synonym for numeral_string added for convenience.

string_numeral_of_size [QCheck]

Synonym for numeral_string_of_size added for convenience.

string_of [QCheck2.Gen]

Builds a string generator using the given character generator.

string_of [QCheck.Gen]

Builds a string generator using the given character generator.

string_of [QCheck]

Synonym for QCheck.string_gen added for convenience.

string_of_size [QCheck]

Generates strings with distribution of characters of char.

string_printable [QCheck2.Gen]

Builds a string generator using the QCheck2.Gen.printable character generator.

string_printable [QCheck.Gen]

Builds a string generator using the QCheck.Gen.printable character generator.

string_printable [QCheck]

Synonym for printable_string added for convenience.

string_printable_of_size [QCheck]

Synonym for printable_string_of_size added for convenience.

string_readable [QCheck.Gen]
string_size [QCheck2.Gen]

Builds a string generator from a (non-negative) size generator.

string_size [QCheck.Gen]

Builds a string generator from a (non-negative) size generator.

string_small [QCheck2.Gen]

Builds a string generator using the QCheck2.Gen.char characher generator, length is QCheck2.Gen.small_nat.

string_small [QCheck.Gen]

Builds a string generator using the QCheck.Gen.char character generator, length is QCheck.Gen.small_nat

string_small [QCheck]

Synonym for small_string added for convenience.

string_small_of [QCheck2.Gen]

Builds a string generator using the given characher generator, length is QCheck2.Gen.small_nat.

string_small_of [QCheck.Gen]

Builds a string generator using the given character generator, length is QCheck.Gen.small_nat.

string_small_of [QCheck]

Same as QCheck.string_of but with a small length (ie QCheck.Gen.small_nat ).

string_small_printable [QCheck]

Synonym for small_printable_string added for convenience.

sub [QCheck2.Shrink.Number]
T
test_get_count [QCheck2.Test]
test_get_long_factor [QCheck2.Test]
to_ounit2_test [QCheck_ounit]

to_ounit2_test ?rand t wraps t into a OUnit2 test

to_ounit2_test_list [QCheck_ounit]

to_ounit2_test_list ?rand t like to_ounit2_test but for a list of tests

to_ounit_test [QCheck_ounit]

to_ounit_test ~rand t wraps t into a OUnit test

to_ounit_test_cell [QCheck_ounit]

Same as QCheck_ounit.to_ounit_test but with a polymorphic test cell

triple [QCheck2.Observable]

triple o1 o2 o3 is an observable of triples of ('a * 'b * 'c).

triple [QCheck2.Print]

triple p1 p2 p3 is a printer of triple.

triple [QCheck2.Gen]

triple gen1 gen2 gen3 generates triples.

triple [QCheck.Observable]
triple [QCheck.Shrink]

Similar to QCheck.Shrink.pair

triple [QCheck.Iter]
triple [QCheck.Print]

Triple (3-tuple) printer.

triple [QCheck.Gen]

Generates triples.

triple [QCheck]

Combines three generators into a generator of 3-tuples.

tup2 [QCheck2.Print]

2-tuple printer.

tup2 [QCheck2.Gen]
tup2 [QCheck.Shrink]

tup2 a b uses a to shrink the first element of tuples, then tries to shrink the second element using b.

tup2 [QCheck.Print]

2-tuple printer.

tup2 [QCheck.Gen]
tup2 [QCheck]

Combines two generators into a 2-tuple generator.

tup3 [QCheck2.Print]

3-tuple printer.

tup3 [QCheck2.Gen]
tup3 [QCheck.Shrink]

Similar to QCheck.Shrink.tup2

tup3 [QCheck.Print]

3-tuple printer.

tup3 [QCheck.Gen]
tup3 [QCheck]

Combines three generators into a 3-tuple generator.

tup4 [QCheck2.Print]

4-tuple printer.

tup4 [QCheck2.Gen]
tup4 [QCheck.Shrink]

Similar to QCheck.Shrink.tup2

tup4 [QCheck.Print]

4-tuple printer.

tup4 [QCheck.Gen]
tup4 [QCheck]

Combines four generators into a 4-tuple generator.

tup5 [QCheck2.Print]

5-tuple printer.

tup5 [QCheck2.Gen]
tup5 [QCheck.Shrink]

Similar to QCheck.Shrink.tup2

tup5 [QCheck.Print]

5-tuple printer.

tup5 [QCheck.Gen]
tup5 [QCheck]

Combines five generators into a 5-tuple generator.

tup6 [QCheck2.Print]

6-tuple printer.

tup6 [QCheck2.Gen]
tup6 [QCheck.Shrink]

Similar to QCheck.Shrink.tup2

tup6 [QCheck.Print]

6-tuple printer.

tup6 [QCheck.Gen]
tup6 [QCheck]

Combines six generators into a 6-tuple generator.

tup7 [QCheck2.Print]

7-tuple printer.

tup7 [QCheck2.Gen]
tup7 [QCheck.Shrink]

Similar to QCheck.Shrink.tup2

tup7 [QCheck.Print]

7-tuple printer.

tup7 [QCheck.Gen]
tup7 [QCheck]

Combines seven generators into a 7-tuple generator.

tup8 [QCheck2.Print]

8-tuple printer.

tup8 [QCheck2.Gen]
tup8 [QCheck.Shrink]

Similar to QCheck.Shrink.tup2

tup8 [QCheck.Print]

8-tuple printer.

tup8 [QCheck.Gen]
tup8 [QCheck]

Combines eight generators into a 8-tuple generator.

tup9 [QCheck2.Print]

9-tuple printer.

tup9 [QCheck2.Gen]
tup9 [QCheck.Shrink]

Similar to QCheck.Shrink.tup2

tup9 [QCheck.Print]

9-tuple printer.

tup9 [QCheck.Gen]
tup9 [QCheck]

Combines nine generators into a 9-tuple generator.

U
ui32 [QCheck2.Gen]

Generates QCheck2.Gen.int32 values.

ui32 [QCheck.Gen]

Generates (unsigned) int32 values.

ui64 [QCheck2.Gen]

Generates QCheck2.Gen.int64 values.

ui64 [QCheck.Gen]

Generates (unsigned) int64 values.

unit [QCheck2.Observable]

unit is an observable of unit.

unit [QCheck2.Print]

unit is a printer of unit.

unit [QCheck2.Gen]

The unit generator.

unit [QCheck.Observable]
unit [QCheck.Shrink]
unit [QCheck.Print]
unit [QCheck.Gen]

The unit generator.

unit [QCheck]

Always generates (), obviously.

V
verbose [QCheck_base_runner]

Is the default mode verbose or quiet?

W
warnings [QCheck2.TestResult]

Obtain list of warnings

warnings [QCheck.TestResult]

Obtain list of warnings