[Haskell-cafe] Debugging
Neil Mitchell
ndmitchell at gmail.com
Thu May 10 05:43:50 EDT 2007
Hi
The basic advantages of SC (stolen from the user manual):
* write test generators for your own types more easily?
* be sure that any counter-examples found are minimal?
* write properties using existentials as well as universals?
* establish complete coverage of a defined test-space?
* display counter-examples of functional type?
* guarantee repeatable test results?
The disadvantage is that if your program only crashes on larger
expressions, it will probably take forever to find a counter example.
Thanks
Neil
On 5/10/07, Jules Bean <jules at jellybean.co.uk> wrote:
> Joel Reymont wrote:
> >
> > On May 10, 2007, at 10:19 AM, Jules Bean wrote:
> >
> >> The 'next step' is to move from testing by hand in ghci to writing
> >> quickcheck properties / smallcheck / unit tests for the functions.
> >
> > I still don't understand the difference between QC and SC. Would
> > someone kindly explain and provide an example or two of when SC should
> > be used?
> The most important difference is that:
>
> QC checks 'a random selection' of possible parameter values.
>
> SC checks 'every possible' in some methodical way, stopping at a certain
> depth for recursive structures.
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
More information about the Haskell-Cafe
mailing list