QuickCheck integration
You can use sandwich-quickcheck
(provided as a separate package) to easily integrate integrate QuickCheck tests into the test tree.
Haddocks can be found here.
#
UsageTo use sandwich-quickcheck
, just add the package to your project. Then, introduce a QuickCheck argument context using introduceQuickCheck. Now you can start writing props as test nodes using the prop function. For example:
#
Modifying the argsIf you use introduceQuickCheck', you can pass your own value for the QuickCheck Args. The default version uses stdArgs.
If you want to modify the already-introduced arguments in a test tree, we provide the modifyArgs function, as well as helpers like modifyMaxSize
, modifyMaxDiscardRatio
, etc. These are modelled directly after HSpec's Test.Hspec.QuickCheck.
#
Controlling QuickCheck parameters with command line argsThere are not (yet) any built-in command line arguments for controlling QuickCheck parameters such as maxSize
. However, you can add custom command line options to control any parameters you like.