leancheck-0.4.1: Cholesterol-free property-based testing

Safe HaskellNone
LanguageHaskell2010

Test.LeanCheck.Error

Description

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

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, 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.