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 argsSome QuickCheck parameters can be controlled via the command line. To see the valid options, run Sandwich with --print-quickcheck-flags
.