Skip to content

Commit 947f07e

Browse files
emengdsamoht
authored andcommitted
Add uchar testable
1 parent d3e71e6 commit 947f07e

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎src/alcotest-engine/test.ml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ let char =
6363
let pp_char ppf x = Fmt.pf ppf "%C" x in
6464
testable pp_char ( = )
6565

66+
let uchar =
67+
let pp_uchar ppf x = Fmt.Dump.uchar ppf x in
68+
testable pp_uchar ( = )
69+
6670
let string =
6771
let pp_string ppf x = Fmt.pf ppf "%S" x in
6872
testable pp_string ( = )

‎src/alcotest-engine/test.mli‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ val float : float -> float testable
6262
val char : char testable
6363
(** [char] tests characters. *)
6464

65+
val uchar : Uchar.t testable
66+
(** [uchar] tests Unicode characters. *)
67+
6568
val string : string testable
6669
(** [string] tests OCaml strings. *)
6770

0 commit comments

Comments
 (0)