On Mon, Sep 28, 2009 at 10:59 AM, Yusaku Hashimoto <nonow...@gmail.com> wrote:
After a few more investigations, I can say

QuickCheck does:
- make easy to finding couter-cases and refactoring codes
- make easy to test some functions if they have good mathematical properties
- generate random test cases

But QuickCheck does *not*:
- help us to find good properties

So what I want to know is "how to find good properties." Please let me
know how do you find QuickCheck properties. There are so many
tutorials or papers for using QuickCheck, but when I try to apply them
to my programming, I often miss properties in my codes.

Cheers
-nwn

I don't think there's any automated way to come up with good properties given a 
function; that seems tantamount to solving AI.

One thing I've meant to do is look at checkers: 
http://hackage.haskell.org/package/checkers - which I understand includes a 
collection of lots of properties for various datatypes and classes. Presumably 
you could look through it for ideas ('ooh, I forgot that my results should 
monotonically increase!') or pick the module closest to what you're testing and 
steal as many of its properties as you can.

--
gwern

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to