package kaputt

  1. Overview
  2. Docs
type result = Test.result =
  1. | Passed
  2. | Failed of Assertion.failure
  3. | Uncaught of exn * string
  4. | Report of int * int * int * string list * (string * int) list
  5. | Exit_code of int
type !'a classifier = 'a Test.classifier
type t = Test.t
type output_mode = Test.output_mode =
  1. | Text_output of Pervasives.out_channel
  2. | Html_output of Pervasives.out_channel
  3. | Xml_output of Pervasives.out_channel
  4. | Xml_junit_output of Pervasives.out_channel
  5. | Csv_output of Pervasives.out_channel * string
val return : 'a -> unit -> 'a
val make_assert_test : ?title:string -> (unit -> 'a) -> ('a -> 'b) -> ('b -> unit) -> Test.t
val make_simple_test : ?title:string -> (unit -> unit) -> Test.t
val add_assert_test : ?title:string -> (unit -> 'a) -> ('a -> 'b) -> ('b -> unit) -> unit
val add_simple_test : ?title:string -> (unit -> unit) -> unit
val default_classifier : 'a Test.classifier
val default_reducer : 'a Reducer.t
val make_random_test : ?title:string -> ?nb_runs:int -> ?nb_tries:int -> ?classifier:'a Test.classifier -> ?reducer:'a Reducer.t -> ?reduce_depth:int -> ?reduce_smaller:('a -> 'a -> bool) -> ?random_src:Generator.random -> 'a Generator.t -> ('a -> 'b) -> ('a, 'b) Specification.t list -> Test.t
val add_random_test : ?title:string -> ?nb_runs:int -> ?nb_tries:int -> ?classifier:'a Test.classifier -> ?reducer:'a Reducer.t -> ?reduce_depth:int -> ?reduce_smaller:('a -> 'a -> bool) -> ?random_src:Generator.random -> 'a Generator.t -> ('a -> 'b) -> ('a, 'b) Specification.t list -> unit
val make_partial_random_test : ?title:string -> ?nb_runs:int -> ?nb_tries:int -> ?classifier:'a Test.classifier -> ?reducer:'a Reducer.t -> ?reduce_depth:int -> ?reduce_smaller:('a -> 'a -> bool) -> ?random_src:Generator.random -> 'a Generator.t -> ('a -> 'b) -> ('a, 'b Specification.outcome) Specification.t list -> Test.t
val add_partial_random_test : ?title:string -> ?nb_runs:int -> ?nb_tries:int -> ?classifier:'a Test.classifier -> ?reducer:'a Reducer.t -> ?reduce_depth:int -> ?reduce_smaller:('a -> 'a -> bool) -> ?random_src:Generator.random -> 'a Generator.t -> ('a -> 'b) -> ('a, 'b Specification.outcome) Specification.t list -> unit
val make_enum_test : ?title:string -> 'a Enumerator.t -> ('a -> 'b) -> ('a, 'b) Specification.t list -> Test.t
val add_enum_test : ?title:string -> 'a Enumerator.t -> ('a -> 'b) -> ('a, 'b) Specification.t list -> unit
val make_partial_enum_test : ?title:string -> 'a Enumerator.t -> ('a -> 'b) -> ('a, 'b Specification.outcome) Specification.t list -> Test.t
val add_partial_enum_test : ?title:string -> 'a Enumerator.t -> ('a -> 'b) -> ('a, 'b Specification.outcome) Specification.t list -> unit
val make_shell_test : ?title:string -> ([< `Input | `No_input ], [< `No_output | `Output ], [< `Error | `No_error ]) Shell.command list -> Test.t
val add_shell_test : ?title:string -> ([< `Input | `No_input ], [< `No_output | `Output ], [< `Error | `No_error ]) Shell.command list -> unit
val exec_test : Test.t -> Test.result
val exec_tests : Test.t list -> Test.result list
val run_test : ?output:Test.output_mode -> Test.t -> unit
val run_tests : ?output:Test.output_mode -> Test.t list -> unit
val launch_tests : ?output:Test.output_mode -> ?clear:bool -> unit -> unit
val check : ?title:string -> ?nb_runs:int -> ?nb_tries:int -> ?classifier:'a Test.classifier -> ?random_src:Generator.random -> 'a Generator.t -> ('a -> 'b) -> ('a, 'b) Specification.t list -> unit
val check_partial : ?title:string -> ?nb_runs:int -> ?nb_tries:int -> ?classifier:'a Test.classifier -> ?random_src:Generator.random -> 'a Generator.t -> ('a -> 'b) -> ('a, 'b Specification.outcome) Specification.t list -> unit
OCaml

Innovation. Community. Security.