package qcheck-multicoretests-util
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=ed5980f1cfbfa1e2d2ec5a87954dddf8
sha512=90c451903adb7cbd83aa0f2ad7738d662edc23affb669ed762564cdb2e140ca931afeaabc199fbb6028163fc41c17049961bef7fd2664c677cb1df552d10736d
doc/qcheck-multicoretests-util/Util/index.html
Module UtilSource
The Util module contains a number of reusable functions handy for multicore testing.
repeat num prop iterates a property prop num times. The function stops early and returns false if just one of the iterations returns false. This is handy if the property outcome is non-determistic, for example, if it depends on scheduling.
exception raised by prop_timeout and fork_prop_with_timeout.
prop_timeout s prop returns a property working as prop that times out and raises Timeout after s seconds.
fork_prop_with_timeout s prop tests a property in a separate process and times out and raises Timeout after s seconds, like prop_timeout s prop. This is handy if the tested code can segfault or loop infinitely.
print_vertical pr cmds returns a string representing a sequential trace. Optional fig_indent indicates how many spaces it should be indented (default: 3 spaces).
val print_triple_vertical :
?fig_indent:int ->
?res_width:int ->
?center_prefix:bool ->
('a -> string) ->
('a list * 'a list * 'a list) ->
stringprint_triple_vertical pr (xs,ys,zs) returns a string representing a parallel trace, with xs printed first, and then ys and zs printed in parallel. Optional fig_indent indicates how many spaces it should be indented (default: 10 spaces). Optional res_width specifies the reserved width for printing each list entry (default: 20 chars). Optional center_prefix centers the sequential prefix if true (the default) and otherwise left-adjust it.
protect f turns an exception throwing function into a result returning function.
Pretty-printing combinators that generate valid OCaml syntax for common types along with combinators for user-defined types