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

0 votes
in test.check by

Deciding on a distribution is the sticky part.

There's some sort of proof of concept (link: https://github.com/clojure/test.check/blob/53d54c3f79f679f59538ba1792826a04a0831789/src/main/clojure/clojure/test/check/generators.cljc#L1666 text: here).

Distribution Idea

Targeting two goals:

  1. The distribution should not be unbounded for normal use; I believe most users who unwittingly encountered a 50mb bigint would consider it a usability problem in several ways; therefore the distribution for size=200 should be bounded at the point where most people wouldn't consider it a usability problem
  2. Given that I've seen bugs that only manifest for (< Double/MAX_VALUE n), it might be good to have an upper bound somewhere in that area

2^1024 is fairly large for generating on a frequent basis, though, so maybe if we targeted something like ~1% of numbers larger than 2^1024 for size=200; I wouldn't even mind a technically unbounded distribution if the probabilities dropped off dramatically (e.g., numbers larger than 2^2048 not generated before the end of the universe)

1 Answer

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