Mads Lindstrøm <mads.lindstr...@gmail.com> writes:
> You could automatically generate QuickCheck tests for many pure
> functions. It will not catch every API change, but it would catch some.
> It would have caught the API change that John mentioned.

As in comparing the old and the new functions?

> But automatically generating QuickCheck tests to test if funOld ==
> funNew, would require quite a bit work. But better than everybody having
> to write unit tests, as other have proposed.

Agreed; however, this has its own problems: you have to load up two
versions of the same library and compare each pair of functions.

Note that even this comparison isn't really legitimate: what happens if
there was some edge/corner case that the old version didn't handle
properly and thus the new one fixes it?  The QC tests would say that
they are different, even though they are actually the same.

Even if we could get around this, there remains another problem:
automatically generating the kind of input each function expects (how do
you encode pre-conditions automatically for such a tool to pick up?
What about pure parsing functions?).

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to