> Hi, I'm trying to figure out QuickCheck 
> and how to generate arbitrary test data form complex data structures; 

sometimes the following workaround is enough:

if you have a function that makes a tree (heap)
from a list, then generate an "arbitrary" list,
and make the tree from that.

of course this might restrict your test set.

similarly, if you want to test a property 
that needs an ordered list (as input),
just generate an arbitrary list
and use a trusted sort function.

oh, and try Smallcheck as well.
http://www.cs.york.ac.uk/fp/smallcheck/
Similar idea, but using complete (instead of random)
enumeration. Sometimes that's easier to control. 

Regards, J.W.


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to