Mavryk_test_helpers.Testable
Testable
collects Alcotest
.testable definitions for OCaml base types.
include module type of struct include Alcotest end
type !'a test_case = string * speed_level * ('a -> return)
val test_case : string -> speed_level -> ('a -> return) -> 'a test_case
type !'a test = string * 'a test_case list
type !'a with_options =
?and_exit:bool ->
?verbose:bool ->
?compact:bool ->
?tail_errors:[ `Limit of int | `Unlimited ] ->
?quick_only:bool ->
?show_errors:bool ->
?json:bool ->
?filter:(name:string -> index:int -> [ `Run | `Skip ]) ->
?log_dir:string ->
?bail:bool ->
?record_backtrace:bool ->
?ci:Alcotest_engine__.Config.ci ->
'a
val run :
(?argv:string array -> string -> unit test list -> return) with_options
val run_with_args :
(?argv:string array ->
string ->
'a Cmdliner.Term.t ->
'a test list ->
return)
with_options
type !'a testable = (module TESTABLE with type t = 'a)
val testable : 'a Fmt.t -> ('a -> 'a -> bool) -> 'a testable
val pp : 'a testable -> 'a Fmt.t
val equal : 'a testable -> 'a -> 'a -> bool
val bool : bool testable
val int : int testable
val int32 : int32 testable
val int64 : int64 testable
val float : float -> float testable
val char : char testable
val string : string testable
val bytes : bytes testable
val unit : unit testable
val of_pp : 'a Fmt.t -> 'a testable
val pass : 'a testable
val reject : 'a testable
val check : ('a testable -> string -> 'a -> 'a -> unit) extra_info
val check' :
('a testable -> msg:string -> expected:'a -> actual:'a -> unit) extra_info
val fail : (string -> 'a) extra_info
val failf :
(('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a) extra_info
val check_raises : (string -> exn -> (unit -> unit) -> unit) extra_info
val exn : exn testable