On Sun, 2006-10-08 at 15:25 -0700, Jason Dagit wrote:

> Another good idea when you have a pretty version which is easy to
> verify for correctness and an ugly version that is harder to verify is
> to use QuickCheck or SmallCheck and define a property that says both
> versions are equal for all inputs.  Ugly code is notorious for holding
> bugs, but doing this would help test the ugly code.

This is exactly how we tested Data.ByteString and to great effect I
think. We uncovered loads of bugs during testing. The few bugs uncovered
by our users since it has been released have invariably been in things
we didn't have QC properties for.

Duncan

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

Reply via email to