Skip to content

Commit

Permalink
qcheck/ounitutil tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
just-max committed Jul 15, 2024
1 parent bdc7410 commit 68e77ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/test-lib/oUnit_util.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ let default_rand =
by interrupting shrinking and showing the smallest value found so far
once the timeout expires. *)
let of_qcheck ?(timeout = default_qcheck_timeout) (QCheck2.Test.Test cell) =
Printexc.record_backtrace true;
let module T = QCheck2.Test in
let name = T.get_name cell in
let count = T.get_count cell in
let test_fun _ =
Printexc.record_backtrace false;
let start = Mtime_clock.counter () in
let passed = ref 0 in
let last_shrunk = ref None in
Expand Down
2 changes: 1 addition & 1 deletion src/test-lib/qCheck_util.ml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ let assert_equal
match wrap actual_f with
| Ok (Some x) -> Ok x
| Ok None -> Error (report @@ "Your submission timed out")
| Error { exn = e; _ } ->
| Error Util.{ exn = e; _ } ->
match is_user_fail e with
| Some s -> Error (report s)
| None -> Error (error_msg @@ Printexc.to_string e)
Expand Down

0 comments on commit 68e77ef

Please sign in to comment.