module type TESTABLE = sig ... endTESTABLE provides an abstract description for testable values.
testable pp eq is a new testable with the pretty-printer pp and equality eq.
val equal : 'a testable -> 'a -> 'a -> boolequal t is t's equality.
val bool : bool testablebool tests booleans.
val int : int testableint tests integers.
val int32 : int32 testableint32 tests 32-bit integers.
val int64 : int64 testableint64 tests 64-bit integers.
val float : float -> float testablefloat tests floats with specified absolute error.
val char : char testablechar tests characters.
val string : string testablestring tests OCaml strings.
val bytes : bytes testablebytes tests OCaml bytes.
val unit : unit testableunit tests unit values (useful for functions with side-effects).
slist t comp tests sorted lists of ts. The list are sorted using comp.
val result : 'a testable -> 'e testable -> ('a, 'e) Stdlib.result testableresult t e tests ts on success and es on failure.
of_pp pp tests values which can be printed using pp and compared using Pervasives.compare
val pass : 'a testablepass tests values of any type and always succeeds.
val reject : 'a testablereject tests values of any type and always fails.
val check : 'a testable -> string -> 'a -> 'a -> unitCheck that two values are equal.
val check' : 'a testable -> msg:string -> expected:'a -> actual:'a -> unitCheck that two values are equal (labeled variant of check).
val failf : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'aSimply fail with a formatted message.
neg t is t's negation: it is true when t is false and it is false when t is true.