Closed Cloven closed 9 years ago
That makes it very similar to choose(Min, Max) doesn't it, except for the shrinker. :-)
It does! There's some sort of unification possible there maybe, but I'm still trying to understand the code so I don't want to go for a big refactor yet.
oh for fuck's sake github
The proper docs for choose/2 say Equivalent to integer(Low, High)
. I wonder what the Quickcheck docs say? I really wish I could get my hands on those... EQCMini's doc has a choose/2 but no int/1,2; only an int/0, so can't really draw any conclusion from there.
Though I guess proper only has int/0, then integer/0 and integer/2, the latter two acting like choose/2 (disregarding the sample size) while int/0 makes use of the sample size.
proper is GPL and EQCMini has a no-reverse-engineering license from what I understand, so I think looking at the Haskell version is probably the safest bet to try to divine algorithmic intent. I'm going to try to find time to go through all the papers listed by the original authors here: http://www.cse.chalmers.se/~rjmh/QuickCheck/
On Sat, Dec 20, 2014 at 12:55 PM, Loïc Hoguin notifications@github.com wrote:
Though I guess proper only has int/0, then integer/0 and integer/2, the latter two acting like choose/2 (disregarding the sample size) while int/0 makes use of the sample size.
— Reply to this email directly or view it on GitHub https://github.com/krestenkrab/triq/pull/42#issuecomment-67749342.
GPL doesn't apply to documentation, you can use documentation to rewrite something regardless of project license. Of course you have to assume the documentation is correct and up to date... :-)
You can also look at Ried Draper's simple check (Clojure) for ideas, or just ask Ried to himself
changes the int(L,M) range generator to always range between L and M, regardless of samplesize.