leancheck-0.6.0: Cholesterol-free property-based testing

Safe HaskellNone
LanguageHaskell2010

Test.LeanCheck.Error

Description

LeanCheck is a simple enumerative property-based testing library.

This module re-exports Test.LeanCheck but some test functions have been specialized to catch errors (see the explicit export list below).

This module is unsafe as it uses unsafePerformIO to catch errors.

Synopsis

Documentation

holds :: Testable a => Int -> a -> Bool Source #

fails :: Testable a => Int -> a -> Bool Source #

exists :: Testable a => Int -> a -> Bool Source #

witness :: Testable a => Int -> a -> Maybe [String] Source #

witnesses :: Testable a => Int -> a -> [[String]] Source #

results :: Testable a => a -> [([String], Bool)] Source #

errorToNothing :: a -> Maybe a Source #

Transforms a value into Just that value or Nothing on some errors:

  • ArithException
  • ArrayException
  • ErrorCall
  • PatternMatchFail

anyErrorToNothing :: a -> Maybe a Source #

Transforms a value into Just that value or Nothing on error.