testing-feat-1.1.0.0: Functional Enumeration of Algebraic Types

Safe HaskellNone
LanguageHaskell98

Test.Feat.Driver

Contents

Description

A simple testing driver for testing properties using FEAT. Contains three drivers with different levels of flexibility of configuration.

Ironically, this code is mostly untested at the moment.

Synopsis

Simple test driver

test :: Enumerable a => (a -> Bool) -> IO [a] Source #

Test with default options (defOptions). Returns a list of counterexamples

Test driver with show/readable options

testOptions :: Enumerable a => Options -> (a -> Bool) -> IO [a] Source #

Test with basic options. Returns a list of counterexamples.

data Options Source #

Basic options for executing a test. Unlike FlexibleOptions this type has Show/Read instances.

Constructors

Options 

Fields

defOptions :: Options Source #

60 seconds timeout, maximum size of 100, bound of 100000 tests per size

Extremely flexible test driver

testFlex :: FlexibleOptions a -> (a -> Bool) -> IO (Result, [a]) Source #

The most flexible test driver, can be configured to behave in almost any way.

data Result Source #

Constructors

Exhausted

Reached max size

Quota

Reached max number of counterexamples

TimedOut 
Other 

Instances

type FlexibleOptions a = IO (FlexOptions a) Source #

Much more flexible options for configuring every part of the test execution. a is the parameter type of the property.

data FlexOptions a Source #

FlexOptions

Constructors

FlexOptions 

Fields