Closed vincent-hugot closed 8 years ago
Given the low number of test cases, rather than using probabilities, I propose going through a fixed list of test "corner cases" before falling back on a standard generator. Of course you need to generate a fresh generator for each test. See recent commit.
edit: and no, the max_int in the corner cases of small_int shouldn't be there. It's just to illustrate the idea, this will be fixed when the default corner generators are defined.
Present in #19 .
https://github.com/ocaml-batteries-team/batteries-included/commit/9e26f5b31fa1afbadb30f473b892f51d9f1ae7a0
Gasche said:
Long term, it may be nice to have default generators that exercise corner cases (empty list, 0, negative number, max_int, min_int, sub-normal floats...) with higher probability, instead of uniforms as is mostly the case so far, so that we cover more issues even with reduced test number.