package ounit

  1. Overview
  2. Docs
val assert_failure : string -> 'a
val assert_bool : string -> bool -> unit
val (@?) : string -> bool -> unit
val assert_string : string -> unit
val assert_command : ?exit_code:Unix.process_status -> ?sinput:char Stream.t -> ?foutput:(char Stream.t -> unit) -> ?use_stderr:bool -> ?env:string array -> ?verbose:bool -> string -> string list -> unit
val assert_equal : ?cmp:('a -> 'a -> bool) -> ?printer:('a -> string) -> ?pp_diff:(Format.formatter -> ('a * 'a) -> unit) -> ?msg:string -> 'a -> 'a -> unit
val assert_raises : ?msg:string -> exn -> (unit -> 'a) -> unit
val skip_if : bool -> string -> unit
val todo : string -> unit
val cmp_float : ?epsilon:float -> float -> float -> bool
val bracket : (unit -> 'a) -> ('a -> unit) -> ('a -> unit) -> unit -> unit
val bracket_tmpfile : ?prefix:string -> ?suffix:string -> ?mode:Pervasives.open_flag list -> ((string * Pervasives.out_channel) -> unit) -> unit -> unit
type test_fun = unit -> unit
type test =
  1. | TestCase of test_fun
  2. | TestList of test list
  3. | TestLabel of string * test
val (>:) : string -> test -> test
val (>::) : string -> test_fun -> test
val (>:::) : string -> test list -> test
val test_decorate : (test_fun -> test_fun) -> test -> test
val test_filter : ?skip:bool -> string list -> test -> test option
val test_case_count : test -> int
type node =
  1. | ListItem of int
  2. | Label of string
type path = node list
val string_of_node : node -> string
val string_of_path : path -> string
val test_case_paths : test -> path list
type test_result =
  1. | RSuccess of path
  2. | RFailure of path * string
  3. | RError of path * string
  4. | RSkip of path * string
  5. | RTodo of path * string
type test_event =
  1. | EStart of path
  2. | EEnd of path
  3. | EResult of test_result
val perform_test : (test_event -> 'a) -> test -> test_result list
val run_test_tt : ?verbose:bool -> test -> test_result list
val run_test_tt_main : ?arg_specs:(Arg.key * Arg.spec * Arg.doc) list -> ?set_verbose:(bool -> unit) -> test -> test_result list