[Haskell-cafe] Letting the darcs test fail,
if QuickCheck tests fail
David Roundy
droundy at darcs.net
Tue Oct 30 13:12:23 EDT 2007
On Tue, Oct 30, 2007 at 05:24:21PM +0100, Henning Thielemann wrote:
> When following the description on
> http://www.haskell.org/haskellwiki/How_to_write_a_Haskell_program#Add_some_automated_testing:_QuickCheck
> then darcs will run the QuickCheck tests on each 'darcs record', but the
> new patch is also accepted by darcs if one of the tests fail. What is the
> most simple way to let 'darcs record' fail, when a QuickCheck test fails?
You can do this with QuickCheck 2 using quickCheck', but I don't know how
to do this with QuickCheck 1. xmonad uses a function "mytests", which I
guess is pretty much copied from the code of QuickCheck 1, with tracking of
errors added in. It's ugly, but it's only a few dozen lines.
Another option would be to grep the output of the test suite to look for
failure.
--
David Roundy
Department of Physics
Oregon State University
More information about the Haskell-Cafe
mailing list