QCheck2.TestResult
Result of running a test
type 'a counter_ex = {
instance : 'a; | (* The counter-example *) |
shrink_steps : int; | (* How many shrinking steps for this counter-example *) |
msg_l : string list; | (* 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)
val get_count : _ t -> int
get_count t
returns the number of tests executed.
val get_count_gen : _ t -> int
get_count_gen t
returns the number of generated cases.
val get_collect : _ t -> ( string, int ) Stdlib.Hashtbl.t option
get_collect t
returns the repartition of generated values.
get_stats t
returns the statistics captured by the test.
val get_warnings : _ t -> string list
get_warnings t
returns the list of warnings emitted during the test.
val get_instances : 'a t -> 'a list
get_instances t
returns the generated instances, with no guarantee on the order.
val is_success : _ t -> bool
Returns true iff the state is Success
val is_failed : _ t -> bool
Returns true iff the state is Failed _
val warnings : _ t -> string list
Obtain list of warnings
val collect : _ t -> ( string, int ) Stdlib.Hashtbl.t option
Obtain statistics