package ounit2

  1. Overview
  2. Docs
type position = {
  1. filename : string;
  2. line : int;
}
type log_severity = [
  1. | `Error
  2. | `Warning
  3. | `Info
]

See OUnit.mli.

type 'result test_event =
  1. | EStart
  2. | EEnd
  3. | EResult of 'result
  4. | ELog of log_severity * string
  5. | ELogRaw of string

See OUnit.mli.

type ('path, 'result) result_full = 'path * 'result * position option
type ('path, 'result) global_event =
  1. | GConf of string * string
    (*

    Dump a configuration options.

    *)
  2. | GLog of log_severity * string
  3. | GStart
    (*

    Start running the tests.

    *)
  4. | GEnd
    (*

    Finish running the tests.

    *)
  5. | GResults of float * ('path, 'result) result_full list * int

Events which occur at the global level.

type ('path, 'result) log_event_t =
  1. | GlobalEvent of ('path, 'result) global_event
  2. | TestEvent of 'path * 'result test_event
type ('path, 'result) log_event = {
  1. shard : string;
  2. timestamp : float;
  3. event : ('path, 'result) log_event_t;
}
type ('path, 'result) logger = {
  1. lshard : string;
  2. fwrite : ('path, 'result) log_event -> unit;
  3. fpos : unit -> position option;
  4. fclose : unit -> unit;
}
val shard_default : string
val string_of_event : ('a, 'b) log_event_t -> string
val null_logger : ('a, 'b) logger
val fun_logger : (('a, 'b) log_event -> unit) -> (unit -> unit) -> ('c, 'd) logger
val post_logger : (('a, 'b) log_event list -> unit) -> ('c, 'd) logger
val set_shard : string -> ('a, 'b) logger -> ('c, 'd) logger
val report : ('a, 'b) logger -> ('c, 'd) log_event_t -> unit
val infof : ('a, 'b) logger -> ('c, unit, string, unit) Stdlib.format4 -> 'd
val warningf : ('a, 'b) logger -> ('c, unit, string, unit) Stdlib.format4 -> 'd
val errorf : ('a, 'b) logger -> ('c, unit, string, unit) Stdlib.format4 -> 'd
val position : ('a, 'b) logger -> position option
val close : ('a, 'b) logger -> unit
val combine : ('a, 'b) logger list -> ('c, 'd) logger
module Test : sig ... end
OCaml

Innovation. Community. Security.