leancheck-0.6.0: Cholesterol-free property-based testing

Safe HaskellSafe
LanguageHaskell2010

Test.LeanCheck.IO

Description

QuickCheck-like interface to LeanCheck

Synopsis

Documentation

check :: Testable a => a -> IO () Source #

Checks a property printing results on stdout

> check $ \xs -> sort (sort xs) == sort (xs::[Int])
+++ OK, passed 200 tests.
> check $ \xs ys -> xs `union` ys == ys `union` (xs::[Int])
*** Failed! Falsifiable (after 4 tests):
[] [0,0]

checkFor :: Testable a => Int -> a -> IO () Source #

Check a property for a given number of tests printing results on stdout

checkResult :: Testable a => a -> IO Bool Source #

Check a property printing results on stdout and returning True on success.

There is no option to silence this function: for silence, you should use holds.

checkResultFor :: Testable a => Int -> a -> IO Bool Source #

Check a property for a given number of tests printing results on stdout and returning True on success.

There is no option to silence this function: for silence, you should use holds.