val fail_report : string ‑> 'aFail the test with some additional message that will be reported.
val fail_reportf : ('a, Format.formatter, unit, 'b) Pervasives.format4 ‑> 'aFormat version of fail_report
val make_cell : ?count:int ‑> ?long_factor:int ‑> ?max_gen:int ‑> ?max_fail:int ‑> ?small:('a ‑> int) ‑> ?name:string ‑> 'a arbitrary ‑> ('a ‑> bool) ‑> 'a cellmake_cell arb prop builds a test that checks property prop on instances
of the generator arb.
arbitrary.small.
If there is no shrinking function but there is a small
function, only the smallest failures will be printed.val get_law : 'a cell ‑> 'a ‑> boolval get_name : _ cell ‑> stringval set_name : _ cell ‑> string ‑> unitval make : ?count:int ‑> ?long_factor:int ‑> ?max_gen:int ‑> ?max_fail:int ‑> ?small:('a ‑> int) ‑> ?name:string ‑> 'a arbitrary ‑> ('a ‑> bool) ‑> tmake arb prop builds a test that checks property prop on instances
of the generator arb.
See make_cell for a description of the parameters.
exception Test_fail of string * string listException raised when a test failed, with the list of counter-examples.
Test_fail (name, l) means test name failed on elements of l.
exception Test_error of string * string * exn * stringException raised when a test raised an exception e, with
the sample that triggered the exception.
Test_error (name, i, e, st)
means name failed on i with exception e, and st is the
stacktrace (if enabled) or an empty string.
val print_instance : 'a arbitrary ‑> 'a ‑> stringval print_c_ex : 'a arbitrary ‑> 'a TestResult.counter_ex ‑> stringval print_fail : 'a arbitrary ‑> string ‑> 'a TestResult.counter_ex list ‑> stringval print_error : ?st:string ‑> 'a arbitrary ‑> string ‑> ('a TestResult.counter_ex * exn) ‑> stringval check_result : 'a cell ‑> 'a TestResult.t ‑> unitcheck_result cell res checks that res is Ok _, and returns unit.
Otherwise, it raises some exception.
res = Error _res = Failed _Callback executed after each instance of a test has been run. The callback is given the instance tested, and the current results of the test.
Callback executed after each test has been run.
f name cell res means test cell, named name, gave res.
val check_cell : ?long:bool ‑> ?call:'a callback ‑> ?step:'a step ‑> ?handler:'a handler ‑> ?rand:Random.State.t ‑> 'a cell ‑> 'a TestResult.tcheck_cell ~long ~rand test generates up to count random
values of type 'a using arbitrary and the random state st. The
predicate law is called on them and if it returns false or raises an
exception then we have a counter-example for the law.
true then multiply the number of instances to generate
by the cell's long_factor.val check_cell_exn : ?long:bool ‑> ?call:'a callback ‑> ?step:'a step ‑> ?rand:Random.State.t ‑> 'a cell ‑> unitSame as check_cell but calls check_result on the result.
res = Error _res = Failed _val check_exn : ?long:bool ‑> ?rand:Random.State.t ‑> t ‑> unitChecks the property against some test cases, and calls check_result, which might raise an exception in case of failure.
res = Error _res = Failed _