Module QCheck2.Print
Printing functions and helpers, used to print generated values on test failures.
val unit : unit t
unit
is a printer of unit.- since
- 0.6
val int : int t
int
is a printer of integer.
val bool : bool t
bool
is a printer of boolean.
val float : float t
float
is a printer of float.
val char : char t
char
is a printer of character.
val string : string t
string
is a printer of string.
val quad : 'a t -> 'b t -> 'c t -> 'd t -> ('a * 'b * 'c * 'd) t
quad p1 p2 p3 p4
is a printer of quadruple.
val contramap : ('b -> 'a) -> 'a t -> 'b t
contramap f p
transforms printerp
into another usingf
.Note the reverse order of types in
f
which may be conter-intuitive: indeed a function that prints values of type'b
can be obtained by transforming a value of type'b
to'a
usingf
, and then by printing this value of type'a
usingp
.