smallcheck-0.6: A property-based testing library

MaintainerRoman Cheplyaka <>



Functions to run SmallCheck tests.



smallCheck :: Testable a => Depth -> a -> IO ()Source

Run series of tests using depth bounds 0..d, stopping if any test fails, and print a summary report or a counter-example.

smallCheckI :: Testable a => a -> IO ()Source

Interactive variant, asking the user whether testing should continue/go deeper after a failure/completed iteration.

Example session:

haskell> smallCheckI prop_append1
Depth 0:
  Completed 1 test(s) without failure.
  Deeper? y
Depth 1:
  Failed test no. 5. Test values follow.
  Continue? n
  Deeper? n

depthCheck :: Testable a => Depth -> a -> IO ()Source

Same as smallCheck, but test for values of depth d only