Thanks for you answer.
Can you show an example using it? I couldn’t find even a single usage in practice at
neither Sherlocode nor Code search results · GitHub
I just had a few instances of the following, where I simply replaced int_corners with its definition:
let to_of_int =
QCheck_alcotest.to_alcotest ~colors:true ~verbose:true
QCheck2.(
Test.make ~count:200 ~name:"to_of_int" ~print:string_of_int
Gen.(graft_corners int [ min_int; -2; -1; 0; 1; 2; max_int ] ())
(fun n -> V.to_int (V.of_int n) = n))
This is not very important, and maybe this is not even the correct way to use it.
Please open an issue upstream on the repo with this GitHub - c-cube/qcheck: QuickCheck inspired property-based testing for OCaml. with a bit more detail. I don’t use
QCheck_alcotestmuch myself, but we are certainly open to making the improving the integration.
Will do.
This is not entirely accurate.
QCheck2andQCheckboth offertup2,tup3, …, as well aspair,tripleandquad:
Sorry, I didn’t see those. So, even if I preferred tup2, etc., I can at least use the same convention for both alcotest and qcheck.
FTR, I don’t find
int_nonnegas a combinator name to necessarily be better, as it describes by complement (“doesn’t produce negatives”) in contrast to stating what is produced…
I does describe what it produces: it produces nonnegative integers! Anyway, I don’t advocate any change in the code, but maybe the documentation Gen (qcheck-core.QCheck2.Gen) can be made a bit more consistent (e.g., the doc of int_pos_small says “positive integers (0 included)”, the doc of int_pos says “non-strictly positive”). But all of this is minor; overall I like QCheck very much.