Welcome! Please see the About page for a little more info on how this works.

0 votes
in test.check by

There may not be a single solution to all of these, and some of them may be hard.

Some examples:

  • When specifying bounded integer ranges, we don't intentionally check near all of {{min,0,max}}
    -- At first glance this sounds easy, but it involves making not-obvious decisions about the meaning of "small" examples and where to shrink to. E.g., should {{(gen/generate (gen/choose 5 Integer/MAX_VALUE) 3)}} be highly likely to generate {{Integer/MAX_VALUE}}? (Intuitively that may not match what the user means when passing {{3}} as the {{size}}); and if a test fails for {{1000}} but not for any smaller numbers, should it shrink to {{1000}} or to {{Integer/MAX_VALUE}} since the latter is "simpler" in a certain sense?
  • The size of a collection correlates with the {{size}} of its elements
    -- i.e., {{(gen/list gen/nat)}} is highly unlikely to generate a list of 20 {{0}}'s.

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/TCHECK-119 (reported by gfredericks)
...