[darcs-devel] Re: QuickCheck, I assume?

Shae Matijs Erisson shae at ScannedInAvian.com
Fri Apr 8 09:48:50 PDT 2005


Florian Weimer <fw at deneb.enyo.de> writes:

> Checking nontrivial commutes are correct for subcommute
> commute_filepatches... Arguments exhausted after 70 tests.

This is QuickCheck, the automatic testing tool for/in Haskell:
http://www.cs.chalmers.se/~rjmh/QuickCheck/

> It seems that this message is not printed by darcs code, and I'm
> confused because messages which contain "exhausted" usually aren't
> harmless.

When you combine QuickCheck generators and filters, after a certain number of
randomly generated data values have failured the filter, the generate/filter
loop bails out.

I'd guess that's to prevent the user from waiting too long for infinite loops
or generators that will take a long time to find a useful value.

> There is another problem: too many display updates during testing
> increase testing time unnecessarily.

That's easy to fix by changing the default Config used by QuickCheck:
quiet :: Config
quiet = quick
  { every = \n args -> [] }

If this config is in scope, you can use "check quiet" instead of "quickCheck".
-- 
Programming is the Magic Executable Fridge Poetry, | www.ScannedInAvian.com
It is machines made of thought, fueled by ideas.   | -- Shae Matijs Erisson





More information about the darcs-devel mailing list