RFC: QuickCheck randomized tester #1347

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Member

pao commented Oct 7, 2012

Includes basic properties, conditional properties, quantified properties, and
testcase generators for primitive types and arrays/composites of those types.

Also includes a simple demonstration of usage with testcases for iostring.jl.

I've DRYed it out a bit from the original posting on -dev, but I'm still
not sure how best to present the API. I've put it here to gather concrete
feedback (and to establish whether this is something we want).

Basic implementation of QuickCheck randomized tester
Includes basic properties, conditional properties, quantified properties, and
testcase generators for primitive types and arrays/composites of those types.

Also includes a simple demonstration of usage with testcases for iostring.jl.

I'm not the best to comment, but this looks quite useful. If I understand it, the sizes of the arguments essentially grows linearly with the test #? How do the combinatorics of this work out? I.e., a function that takes three arrays as input?

Owner

pao replied Oct 14, 2012

Yes; the default size function (which right now is not replaceable, that's a TODO) is taken directly from the QuickCheck source:

quick = Config
  { maxTest = 100
  , maxFail = 1000
  , size    = (+ 3) . (`div` 2)
  , every   = \n args -> let s = show n in s ++ [ '\b' | _ <- s ]
  }

I'm considering pulling options.jl in as a dependency for basically that reason.

Combinatoricaly, this will never end up testing large array vs. small array or vice-versa, since the size function is computed for the iteration, not in some fancier way. I'm not sure if there's a good way around that without ending up with an explosion.

Member

pao commented Nov 27, 2012

These are being closed by Viral now that the package manager is making sense. Preempted!

@pao pao closed this Nov 27, 2012

Owner

ViralBShah commented Nov 27, 2012

Thanks. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment