module Test: sig
.. end
Unit for doing the tests.
Author(s): Stefan Wehr, Phillip Heidegger
val assert_failure : string -> 'a
val assert_bool : string -> bool -> unit
val (@?) : string -> bool -> unit
val assert_string : string -> unit
val assert_equal : ?cmp:('a -> 'a -> bool) ->
?printer:('a -> string) -> ?msg:string -> 'a -> 'a -> unit
val assert_raises : ?msg:string -> exn -> (unit -> 'a) -> unit
val cmp_float : ?epsilon:float -> float -> float -> bool
val bracket : (unit -> 'a) -> ('a -> 'b) -> ('a -> 'c) -> unit -> 'c
Functions for manipulating the global test case list
type
test_fun = unit -> unit
type of a test function
type
tests = (string * test_fun) list
List of Unit tests for one module
val install_tests : string -> (unit -> tests) -> unit
install_tests "module" f
adds for the module
give as first parameter all test into the test suite,
if run tests is called. The function f
returns the
tests. It is not directly given to avoid computing the
tests if they are not called. The tests are added into
the global test case list.
val run_tests : string list option -> bool
Runs all tests if None
is given. If Some l
is given,
l
is the list of modules witch tests should be executed.
val test_program : string -> test_fun