[Haskell-cafe] Letting the darcs test fail,
if QuickCheck tests fail
josef.svenningsson at gmail.com
Tue Oct 30 12:32:51 EDT 2007
On 10/30/07, Henning Thielemann <lemming at henning-thielemann.de> wrote:
> When following the description on
> 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?
The same thing bit me when I prepared a package recently. The way I
solved it was to call the function quickCheck' instead of test. It
returns a boolean indicating if the test was successful or not. If
it's false I call exitWithFailure. I posted some code to the wikibook:
Note that quickCheck' is only available in QuickCheck 2.
All the best,
More information about the Haskell-Cafe