package qcheck-core
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=53cde85bd3f0431faeddeae493f32d9d
sha512=552871a95bcf27a81cd518a4aefc60ac0f08ef73c8e115f199952707b88ab20f7ecb762abb835a196c1adb7b948447e487daa0efbf6a39ee64bfcee0264f189f
doc/qcheck-core/QCheck/Test/index.html
Module QCheck.TestSource
Module related to individual tests. Since 0.18 most of it moved to QCheck2, and the type 'a cell was made a private implementation detail.
Fail the test with some additional message that will be reported.
Format version of fail_report
val make_cell :
?if_assumptions_fail:([ `Fatal | `Warning ] * float) ->
?count:int ->
?long_factor:int ->
?negative:bool ->
?max_gen:int ->
?max_fail:int ->
?small:('a -> int) ->
?retries: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.
Get the tested property of a cell. Synonym for QCheck2.Test.get_law
Get the tested property of a cell. Synonym for QCheck2.Test.get_law
Get the name of a cell. Synonym for QCheck2.Test.get_name
Get the name of a cell. Synonym for QCheck2.Test.get_name
Set the name of a cell. Synonym for QCheck2.Test.set_name
Get the count of a cell. Synonym for QCheck2.Test.get_count
Get the long factor of a cell. Synonym for QCheck2.Test.get_long_factor
val make :
?if_assumptions_fail:([ `Fatal | `Warning ] * float) ->
?count:int ->
?long_factor:int ->
?max_gen:int ->
?max_fail:int ->
?small:('a -> int) ->
?retries: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.
val make_neg :
?if_assumptions_fail:([ `Fatal | `Warning ] * float) ->
?count:int ->
?long_factor:int ->
?max_gen:int ->
?max_fail:int ->
?small:('a -> int) ->
?retries:int ->
?name:string ->
'a arbitrary ->
('a -> bool) ->
tmake_neg arb prop builds a test that checks property prop on instances of the generator arb. The test is considered negative, meaning that it is expected not to satisfy the tested property. This information is recorded in an underlying test cell entry and interpreted suitably by test runners. See make_cell for a description of the parameters.
include module type of QCheck2.Test_exceptions
Exception raised when a test failed, with the list of counter-examples. Test_fail (name, l) means test name failed on elements of l.
Exception 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.
Exception raised when a negative test failed. Test_unexpected_success name means test name failed to find an expected counter example.
val print_error :
?st:string ->
'a cell ->
string ->
('a TestResult.counter_ex * exn) ->
stringval check_cell :
?long:bool ->
?call:'a callback ->
?step:'a step ->
?handler:'a handler ->
?rand:Random.State.t ->
'a cell ->
'a TestResult.t