package ounit

  1. Overview
  2. Docs
Unit testing framework loosely based on HUnit. It is similar to JUnit, and other XUnit testing frameworks

Install

Dune Dependency

Authors

Maintainers

Sources

ounit-2.0.8.tar.gz
sha256=2e30fe79648e928b5a9d20f83d5a1a805826c7193e821464a9e4752661ba2e0e
md5=bd12d66c9dbd95a50570bb686b0f10f5

doc/oUnit.advanced/OUnitLogger/index.html

Module OUnitLoggerSource

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

See OUnit.mli.

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

See OUnit.mli.

Sourcetype ('path, 'result) result_full = 'path * 'result * position option
Sourcetype ('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.

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

Innovation. Community. Security.