maxSize argument

Moritz Fürneisen fuerneis at cs.uni-bonn.de
Tue Jul 24 13:57:55 BST 2012


Dear QuickCheck developers,

in my Bachelor Thesis I'm using QuickCheck and I have tests that become quite large.
Therefore it is crucial to control the size of my testdata.
Apparently this is not possible when using the (==>) combinator.
A minimal example i found are the following two tests:


	Test.QuickCheck> quickCheckWith stdArgs{maxSize = 4, maxSuccess = 50000} (( \x -> property $  ((x >= -4) &&  (x <= 4))) :: Int -> Property )
	+++ OK, passed 50000 tests.

	

	Test.QuickCheck> quickCheckWith stdArgs{maxSize = 4, maxSuccess = 50000} (( \x -> x >= 0 ==>  (x <= 4)) :: Int -> Property )
	*** Failed! Falsifiable (after 52 tests and 2 shrinks):    
	5

Is this a bug or a feature(like simulated annealing)?
If it is a feature, is there a possibility to disable it?
I wasn't able to determine from the sources, why the number of discarded tests relates to testsize.

Kind Regards
Moritz


More information about the QuickCheck mailing list