qcheck

QuickCheck inspired property-based testing for OCaml.
IN THIS PACKAGE
Module QCheck . TestResult
type 'a counter_ex = {
instance : 'a;(*

The counter-example(s)

*)
shrink_steps : int;(*

How many shrinking steps for this counterex

*)
msg_l : string list;(*

messages.

  • since 0.7
*)
}
type 'a failed_state = 'a counter_ex list
type 'a state =
| Success
| Failed of 'a failed_state(*

Failed instances

*)
| Error of 'a counter_ex * exn * string(*

Error, backtrace, and instance that triggered it

*)
type 'a t = {
mutable state : 'a state;
mutable count : int;
mutable count_gen : int;
collect_tbl : ( string, int ) Hashtbl.t lazy_t;
stats_tbl : ('a stat * ( int, int ) Hashtbl.t) list;(*
  • since 0.6
*)
}
val collect : _ t -> ( string, int ) Hashtbl.t option

Obtain statistics

  • since 0.6
val stats : 'a t -> ('a stat * ( int, int ) Hashtbl.t) list

Obtain statistics

  • since 0.6