mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
add test for String.to_hex
This commit is contained in:
parent
911e9faff7
commit
977e0c9577
1 changed files with 5 additions and 3 deletions
|
|
@ -1173,9 +1173,11 @@ let of_hex s = try Some (of_hex_exn s) with Invalid_argument _ -> None
|
||||||
*)
|
*)
|
||||||
|
|
||||||
(*$Q
|
(*$Q
|
||||||
Q.(string) (fun s -> \
|
Q.(string) (fun s -> \
|
||||||
of_hex_exn (to_hex s) = s)
|
of_hex_exn (to_hex s) = s)
|
||||||
*)
|
Q.(string) (fun s -> \
|
||||||
|
String.for_all (function 'A'..'F'|'a'..'f'|'0'..'9' -> true | _ -> false) @@ to_hex s)
|
||||||
|
*)
|
||||||
|
|
||||||
let pp_buf buf s =
|
let pp_buf buf s =
|
||||||
Buffer.add_char buf '"';
|
Buffer.add_char buf '"';
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue