leancheck-0.3.0: Cholesterol-free property-based testing

Safe HaskellNone
LanguageHaskell2010

Test.Check.Error

Description

A simple property-based testing library based on enumeration of values via lists of lists.

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

This module is unsafe, 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

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.

module Test.Check