module TestResult:sig..end
Result of running a test
type 'a counter_ex = {
|
instance : |
(* | The counter-example | *) |
|
shrink_steps : |
(* | How many shrinking steps for this counter-example | *) |
|
msg_l : |
(* | Messages of the test. Currently only populated by
| *) |
}
A counter-example when a test fails.
type 'a state =
| |
Success |
(* | If the test passed. | *) |
|||||||||||||||
| |
Failed of |
(* | If the test failed "normally", i.e. a test returned | *) |
|||||||||||||||
| |
Failed_other of |
(* | If the test failed for an unusual reason:
| *) |
|||||||||||||||
| |
Error of |
(* | If the test failed "exceptionally" (an exception was raised by the test). | *) |
Result state.
changed in 0.10 (move to inline records, add Fail_other)
type 'a t
val get_state : 'a t -> 'a stateget_state t returns the final state after a test execution.
val get_count : 'a t -> intget_count t returns the number of tests executed.
val get_count_gen : 'a t -> intget_count_gen t returns the number of generated cases.
val get_collect : 'a t -> (string, int) Stdlib.Hashtbl.t optionget_collect t returns the repartition of generated values.
val get_stats : 'a t ->
('a QCheck2.stat * (int, int) Stdlib.Hashtbl.t) listget_stats t returns the statistics captured by the test.
val get_warnings : 'a t -> string listget_warnings t returns the list of warnings emitted during the test.
val get_instances : 'a t -> 'a listget_instances t returns the generated instances, with no guarantee on the order.
val is_success : 'a t -> boolReturns true iff the state is Success
val is_failed : 'a t -> boolReturns true iff the state is Failed _
val stats : 'a t ->
('a QCheck2.stat * (int, int) Stdlib.Hashtbl.t) list
val warnings : 'a t -> string list
val collect : 'a t -> (string, int) Stdlib.Hashtbl.t option