Skip to content

Commit

Permalink
ounit util: fix signed division (pathological case)
Browse files Browse the repository at this point in the history
  • Loading branch information
just-max committed May 13, 2024
1 parent f6a08e4 commit 5a00eb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test-lib/oUnit_util.ml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ let of_qcheck ?(timeout = default_qcheck_timeout) (QCheck2.Test.Test cell) =
let test_length =
let open Mtime.Span in
let timeout_ns = to_uint64_ns timeout in
let extra = Int64.(div timeout_ns (of_int 4)) |> of_uint64_ns in
let extra = Int64.(unsigned_div timeout_ns 4L) |> of_uint64_ns in
Custom_length (add timeout extra |> Util.span_to_float_s)
in
name >: TestCase (test_length, test_fun)
Expand Down

0 comments on commit 5a00eb2

Please sign in to comment.