jobjo / popper

Property-based testing at ease
ISC License
43 stars 1 forks source link

Sample.char sometimes fails with Invalid_argument("Char.chr") #62

Closed copy closed 3 years ago

copy commented 3 years ago
open Popper
open Popper.Sample.Syntax
let () = run ~config:(Config.num_samples 100000000) (test (fun () ->
    let* _ = Sample.char in pass))

The high num_samples is necessary to reproduce, however it also happens with a lower sample count when sampling multiple chars per test (char array in my case).

jobjo commented 3 years ago

Thanks for reporting. Will take a look.

jobjo commented 3 years ago

Fixed in https://github.com/jobjo/popper/pull/64.