optint_test.ml 289 B

123456789101112131415
  1. let hex ppf x = x
  2. |> Optint.to_int
  3. |> Format.fprintf ppf "%x"
  4. let test_hex () =
  5. Optint.of_string "1234567"
  6. |> Format.asprintf "0x%a" hex
  7. |> Assrt.equals_string __LOC__ "0x12d687"
  8. let () =
  9. Unix.chdir "../../../test/";
  10. test_hex ();
  11. assert true