sig
exception TestFailure of string
type result = Error of exn | Fail of string | Pass
type outcome = {
label : string;
result : Webtest.Suite.result;
time_s : float;
}
val string_of_result : Webtest.Suite.result -> string
module Sync :
sig
type test_fun = unit -> unit
val bracket :
(unit -> 'a) ->
('a -> unit) -> ('a -> unit) -> Webtest.Suite.Sync.test_fun
end
module Async :
sig
type callback = unit -> unit
val noop : Webtest.Suite.Async.callback
type wrapper = Webtest.Suite.Async.callback -> unit
type test_fun = Webtest.Suite.Async.wrapper -> unit
val bracket :
(unit -> 'a) ->
('a -> Webtest.Suite.Async.wrapper -> unit) ->
('a -> unit) -> Webtest.Suite.Async.test_fun
val run_one :
string ->
Webtest.Suite.Async.test_fun ->
(string -> unit) -> (Webtest.Suite.outcome -> unit) -> unit
val of_sync :
Webtest.Suite.Sync.test_fun -> Webtest.Suite.Async.test_fun
end
type t =
TestCase of string * Webtest.Suite.Async.test_fun
| TestList of string * Webtest.Suite.t list
val ( >:: ) : string -> Webtest.Suite.Sync.test_fun -> Webtest.Suite.t
val ( >:~ ) : string -> Webtest.Suite.Async.test_fun -> Webtest.Suite.t
val ( >::: ) : string -> Webtest.Suite.t list -> Webtest.Suite.t
val assert_true : ?label:string -> bool -> unit
val assert_equal :
?equal:('a -> 'a -> bool) ->
?label:string -> ?printer:('a -> string) -> 'a -> 'a -> unit
val assert_raises : ?label:string -> exn -> (unit -> unit) -> unit
val assert_raises_string :
?label:string -> string -> (unit -> unit) -> unit
end