···4646 let term = Publicsuffix_cmd.registrable_term psl in
4747 match eval_term_with_domain term "com" with
4848 | Some (Error Publicsuffix.Domain_is_public_suffix) -> ()
4949- | Some (Ok v) -> fail (Fmt.str "expected error, got Ok %S" v)
4949+ | Some (Ok v) -> failf "expected error, got Ok %S" v
5050 | Some (Error e) -> fail (Publicsuffix.error_to_string e)
5151 | None -> fail "term evaluation failed"
5252
+2-2
test/test_publicsuffix.ml
···26262727let check_err msg expected_err f =
2828 match f () with
2929- | Ok v -> fail (Fmt.str "%s: expected error, got Ok %S" msg v)
2929+ | Ok v -> failf "%s: expected error, got Ok %S" msg v
3030 | Error e ->
3131 check string msg
3232 (Publicsuffix.error_to_string expected_err)
···34343535let check_err_bool msg expected_err f =
3636 match f () with
3737- | Ok v -> fail (Fmt.str "%s: expected error, got Ok %b" msg v)
3737+ | Ok v -> failf "%s: expected error, got Ok %b" msg v
3838 | Error e ->
3939 check string msg
4040 (Publicsuffix.error_to_string expected_err)