(--) [QCheck.Gen] |
Synonym to
QCheck.Gen.int_range .
|
(--) [QCheck] |
Synonym to
QCheck.int_range .
|
(<*>) [QCheck.Iter] | |
(<*>) [QCheck.Gen] |
Infix operator for composing a function generator and an argument generator
into a result generator.
|
(<+>) [QCheck.Iter] |
Synonym to
QCheck.Iter.append .
|
(==>) [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_runner] |
Same as
OUnit.>::: but with a list of QCheck tests
|
(>>=) [QCheck.Iter] | |
(>>=) [QCheck.Gen] |
Monadic bind for writing dependent generators.
|
(>|=) [QCheck.Iter] | |
(>|=) [QCheck.Gen] |
An infix synonym for
QCheck.Gen.map .
|
(@->) [QCheck.Tuple.Infix] |
Alias to
B_cons .
|
(@::) [QCheck.Tuple.Infix] |
Alias to
QCheck.Tuple.cons .
|
A | |
add_stat [QCheck] |
Add a statistic to the arbitrary instance.
|
always [QCheck] |
Always return the same element.
|
append [QCheck.Iter] | |
apply [QCheck.Fn] | |
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
small_nat .
|
array_of_size [QCheck] |
Generates arrays with length from the given distribution.
|
array_repeat [QCheck.Gen] | array_repeat i g builds an array generator from exactly i elements generated by g .
|
array_size [QCheck.Gen] |
Builds an array generator from a (non-negative) size generator and an element generator.
|
assume [QCheck] | assume cond checks the precondition cond , and does nothing
if cond=true .
|
assume_fail [QCheck] | assume_fail () is like assume false , but can take any type
since we know it always fails (like assert false ).
|
B | |
bool [QCheck.Observable] | |
bool [QCheck.Print] |
Boolean printer.
|
bool [QCheck.Gen] |
The boolean generator.
|
bool [QCheck] |
Uniform boolean generator.
|
C | |
char [QCheck.Observable] | |
char [QCheck.Shrink] | |
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).
|
check_cell [QCheck.Test] | check_cell ~long ~rand test generates up to count random
values of type 'a using arbitrary and the random state st .
|
check_cell_exn [QCheck.Test] |
Same as
QCheck.Test.check_cell but calls QCheck.Test.check_result on the result.
|
check_exn [QCheck.Test] |
Same as
QCheck.Test.check_cell but calls QCheck.Test.check_result on the result.
|
check_result [QCheck.Test] | check_result cell res checks that res is Ok _ , and returns unit.
|
choose [QCheck] |
Choose among the given list of generators.
|
collect [QCheck.TestResult] |
Obtain statistics
|
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 [QCheck.Tuple] | |
E | |
empty [QCheck.Iter] | |
equal [QCheck.Observable] | |
F | |
find [QCheck.Iter] | |
find_example [QCheck] | find_example ~f gen uses gen to generate some values of type 'a ,
and checks them against f .
|
find_example_gen [QCheck] |
Toplevel version of
QCheck.find_example .
|
fix [QCheck.Gen] |
Fixpoint combinator for generating recursive, size-bounded data types.
|
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).
|
frequency [QCheck.Gen] |
Constructs a generator that selects among a given list of generators.
|
frequency [QCheck] |
Similar to
QCheck.oneof but with frequencies.
|
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 [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 [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 [QCheck] | |
fun2_unsafe [QCheck] |
Generator of functions of arity 2.
|
fun3 [QCheck] | |
fun4 [QCheck] | |
fun_nary [QCheck] | fun_nary makes random n-ary functions.
|
G | |
gen [QCheck] |
Access the underlying random generator of this arbitrary object.
|
generate [QCheck.Gen] | generate ~n g generates n instances of g .
|
generate1 [QCheck.Gen] | generate1 g generates one instance of g .
|
get_arbitrary [QCheck.Test] | |
get_count [QCheck.Test] |
Get the count of a cell.
|
get_law [QCheck.Test] | |
get_long_factor [QCheck.Test] |
Get the long factor of a cell.
|
get_name [QCheck.Test] | |
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 [QCheck.Observable] | |
I | |
int [QCheck.Observable] | |
int [QCheck.Shrink] | |
int [QCheck.Print] |
Integer printer.
|
int [QCheck.Gen] |
Generates integers uniformly.
|
int [QCheck] |
Int generator.
|
int32 [QCheck] |
Int32 generator.
|
int64 [QCheck] |
Int64 generator.
|
int_bound [QCheck.Gen] |
Uniform integer generator producing integers within
0... bound .
|
int_bound [QCheck] | int_bound n is uniform between 0 and n included.
|
int_corners [QCheck.Gen] |
All corner cases for int.
|
int_pos_corners [QCheck.Gen] |
Non-negative corner cases for int.
|
int_range [QCheck.Gen] |
Uniform integer generator producing integers within
low,high .
|
int_range [QCheck] | int_range a b is uniform between a and b included.
|
J | |
join [QCheck.Gen] |
Collapses a generator of generators to simply a generator.
|
L | |
list [QCheck.Observable] | |
list [QCheck.Shrink] |
Try to shrink lists by removing elements one by one.
|
list [QCheck.Print] |
List printer.
|
list [QCheck.Gen] |
Builds a list generator from an element generator.
|
list [QCheck] |
Generates lists with length generated by
small_nat .
|
list_of_size [QCheck] |
Generates lists with length from the given distribution.
|
list_repeat [QCheck.Gen] | list_repeat i g builds a list generator from exactly i elements generated by g .
|
list_size [QCheck.Gen] |
Builds a list generator from a (non-negative) size generator and an element generator.
|
long_tests [QCheck_runner] |
Is the default mode to run long tests or nor?
|
M | |
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 [QCheck.Test] | make_cell arb prop builds a test that checks property prop on instances
of the generator arb .
|
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 [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 [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 [QCheck.Gen] |
Generates small natural numbers.
|
neg_float [QCheck] |
Negative float generator (no nan and no infinities).
|
neg_int [QCheck.Gen] |
Generates negative integers.
|
neg_int [QCheck] |
Negative int generator.
|
nfloat [QCheck.Gen] |
Generates negative floating point numbers.
|
nil [QCheck.Tuple] | |
nil [QCheck.Shrink] |
No shrink
|
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
small_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 [QCheck.Tuple] | |
o_nil [QCheck.Tuple] | |
observable [QCheck.Tuple] | |
of_array [QCheck.Iter] | |
of_list [QCheck.Iter] | |
oneof [QCheck.Gen] |
Constructs a generator that selects among a given list of generators.
|
oneof [QCheck] |
Pick a generator among the list, randomly.
|
oneofa [QCheck.Gen] |
Constructs a generator that selects among a given array of values.
|
oneofa [QCheck] |
Pick an element randomly in the array.
|
oneofl [QCheck.Gen] |
Constructs a generator that selects among a given list of values.
|
oneofl [QCheck] |
Pick an element randomly in the list.
|
opt [QCheck.Gen] |
An option generator.
|
option [QCheck.Observable] | |
option [QCheck.Shrink] | |
option [QCheck.Print] |
Option printer.
|
option [QCheck] |
Choose between returning Some random value, or None.
|
P | |
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.
|
pfloat [QCheck.Gen] |
Generates positive floating point numbers.
|
pint [QCheck.Gen] |
Generates positive integers uniformly.
|
pos_float [QCheck] |
Positive float generator (no nan and no infinities).
|
pos_int [QCheck] |
Positive int generator.
|
print [QCheck.Fn] | |
print [QCheck.Observable] | |
print_c_ex [QCheck.Test] | |
print_collect [QCheck.Test] |
Print "collect" results.
|
print_error [QCheck.Test] | |
print_fail [QCheck.Test] | |
print_instance [QCheck.Test] | |
print_stat [QCheck.Test] |
Print statistics.
|
print_test_error [QCheck.Test] | |
print_test_fail [QCheck.Test] | |
printable [QCheck.Gen] |
Generates printable characters.
|
printable_char [QCheck] |
Uniformly distributed over a subset of chars.
|
printable_string [QCheck] |
Generates strings with a distribution of length of
small_nat
and distribution of characters of printable_char .
|
printable_string_of_size [QCheck] |
Generates strings with distribution of characters of
printable_char .
|
Q | |
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_runner] |
Access the current random state
|
return [QCheck.Iter] | |
return [QCheck.Gen] |
Create a constant generator.
|
run [QCheck_runner] | run test runs the test, and returns an error code that is 0
if all tests passed, 1 otherwise.
|
run_tap [QCheck_runner] |
TAP-compatible test runner, in case we want to use a test harness.
|
run_tests [QCheck_runner] |
Run a suite of tests, and print its results.
|
run_tests_main [QCheck_runner] |
Can be used as the main function of a test file.
|
S | |
set_collect [QCheck] | |
set_long_tests [QCheck_runner] |
Change the value of
long_tests ()
|
set_name [QCheck.Test] | |
set_print [QCheck] | |
set_seed [QCheck_runner] |
Change the
QCheck_runner.random_state by creating a new one, initialized with
the given seed.
|
set_shrink [QCheck] | |
set_small [QCheck] | |
set_stats [QCheck] | |
set_verbose [QCheck_runner] |
Change the value of
verbose ()
|
shrink [QCheck.Fn] | |
shuffle_a [QCheck.Gen] |
Shuffles the array in place.
|
shuffle_l [QCheck.Gen] |
Creates a generator of shuffled lists.
|
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 [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_int [QCheck.Gen] |
Small UNSIGNED integers, for retrocompatibility.
|
small_int [QCheck] |
Small unsigned integers.
|
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 [QCheck.Gen] |
Generates lists of small size (range
0 -- 10 ).
|
small_list [QCheck] |
Generates lists of small size (range
0 -- 10 ).
|
small_nat [QCheck.Gen] |
Synonym to
QCheck.Gen.nat .
|
small_nat [QCheck] |
Small unsigned integers.
|
small_printable_string [QCheck] | |
small_signed_int [QCheck.Gen] |
Small SIGNED integers.
|
small_signed_int [QCheck] |
Small signed integers.
|
small_string [QCheck.Gen] |
Builds a string generator.
|
small_string [QCheck] |
Same as
QCheck.string but with a small length (that is, 0--10 ).
|
stats [QCheck.TestResult] |
Obtain statistics
|
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
small_nat
and distribution of characters of char .
|
string_gen [QCheck] |
Generates strings with a distribution of length of
small_nat .
|
string_gen_of_size [QCheck] | |
string_of_size [QCheck] |
Generates strings with distribution of characters if
char .
|
string_size [QCheck.Gen] |
Builds a string generator from a (non-negative) size generator.
|
T | |
to_ounit2_test [QCheck_runner] | to_ounit2_test ?rand t wraps t into a OUnit2 test
|
to_ounit2_test_list [QCheck_runner] | to_ounit2_test_list ?rand t like to_ounit2_test but for a list of tests
|
to_ounit_test [QCheck_runner] | to_ounit_test ~rand t wraps t into a OUnit test
|
to_ounit_test_cell [QCheck_runner] |
Same as
QCheck_runner.to_ounit_test but with a polymorphic test cell
|
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.
|
U | |
ui32 [QCheck.Gen] |
Generates (unsigned)
int32 values.
|
ui64 [QCheck.Gen] |
Generates (unsigned)
int64 values.
|
unit [QCheck.Observable] | |
unit [QCheck.Shrink] | |
unit [QCheck.Print] | |
unit [QCheck.Gen] |
The unit generator.
|
unit [QCheck] |
Always generates
() , obviously.
|
V | |
verbose [QCheck_runner] |
Is the default mode verbose or quiet?
|