Skip to content

Commit f453fc9

Browse files
Use Testable.errormsg
1 parent 4f7c2e6 commit f453fc9

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

test/lib/test_block.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ let test_mk =
3232
`Msg ({|File "_none_", line 1: invalid code block: |} ^ m))
3333
expected
3434
in
35-
Alcotest.(check (result Testable.block Testable.msg))
35+
Alcotest.(check (Testable.errormsg Testable.block))
3636
test_name expected actual
3737
in
3838
(test_name, `Quick, test_fun)

test/lib/test_label.ml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
module Testable = struct
22
open Mdx.Label
3+
include Testable
34

45
let relation = Alcotest.testable Relation.pp ( = )
5-
6-
let msg =
7-
Alcotest.testable (fun fmt (`Msg e) -> Format.pp_print_string fmt e) ( = )
8-
96
let label = Alcotest.testable pp ( = )
107
end
118

@@ -31,7 +28,7 @@ let test_raw_parse =
3128
]
3229

3330
let test_interpret =
34-
let ty = Alcotest.result Testable.label Testable.msg in
31+
let ty = Testable.errormsg Testable.label in
3532
let make_test ~label ~value ~expected =
3633
let test_name = Printf.sprintf "interpret: %S" label in
3734
let test_fun () =

0 commit comments

Comments
 (0)