fitspec-0.4.0: refining property sets for testing Haskell programs

Safe HaskellNone
LanguageHaskell2010

Test.FitSpec.Engine

Description

FitSpec: refining property-sets for functional testing

This is the main engine, besides Test.FitSpec.Mutable.

Synopsis

Documentation

property :: Testable a => a -> Property Source #

Given a Testable type (as defined by Test.LeanCheck), returns a Property.

This function should be used on every property to create a property list to be passed to report, reportWith, mainDefault or mainWith.

property $ \x y -> x + y < y + (x::Int)

type Property = [([String], Bool)] Source #

An encoded representation of a property suitable for use by FitSpec.

Each list of strings is a printable representation of one possible choice of argument values for the property. Each boolean indicate whether the property holds for this choice.

getResults :: Mutable a => a -> (a -> [Property]) -> Int -> Int -> Results a Source #

Return minimality and completeness results. See report.

getResultsExtra :: Mutable a => [a] -> a -> (a -> [Property]) -> Int -> Int -> Results a Source #

getResultsExtraTimeout :: Mutable a => Int -> [a] -> a -> (a -> [Property]) -> Int -> Int -> IO (Results a) Source #

data Result a Source #

A line of result for a single equivalence class of properties with the exact same surviving mutants.

Constructors

Result 

Fields

type Results a = [Result a] Source #

data Conjecture Source #

Constructors

Conjecture 

Fields