Copyright | (c) 2015-2017 Rudy Matela |
---|---|
License | 3-Clause BSD (see the file LICENSE) |
Maintainer | Rudy Matela <rudy@matela.com.br> |
Safe Haskell | None |
Language | Haskell2010 |
FitSpec: refining property-sets for functional testing
This is the main engine, besides Test.FitSpec.Mutable.
Synopsis
- property :: Testable a => a -> Property
- type Property = [([String], Bool)]
- getResults :: Mutable a => a -> (a -> [Property]) -> Int -> Int -> Results a
- getResultsExtra :: Mutable a => [a] -> a -> (a -> [Property]) -> Int -> Int -> Results a
- getResultsExtraTimeout :: Mutable a => Int -> [a] -> a -> (a -> [Property]) -> Int -> Int -> IO (Results a)
- data Result a = Result {
- sets :: [[Int]]
- implied :: [Int]
- survivors :: [a]
- smallestSurvivor :: Maybe a
- nSurvivors :: Int
- nKilled :: Int
- totalMutants :: Int
- score :: Int
- maxTests :: Int
- mutantsExhausted :: Bool
- type Results a = [Result a]
- propertiesNTests :: Int -> [Property] -> [Int]
- propertiesTestsExhausted :: Int -> [Property] -> [Bool]
- propertiesToMap :: [Property] -> Int -> [Bool]
- propertiesHold :: Int -> [Property] -> Bool
- propertiesCE :: Int -> [Property] -> Maybe String
- minimal :: Results a -> Bool
- complete :: Results a -> Bool
- reduceImplications :: [Result a] -> [Result a]
- filterNonCanon :: [Result a] -> [Result a]
- data Conjecture = Conjecture {}
- conjectures :: [Result a] -> [Conjecture]
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
.
getResultsExtraTimeout :: Mutable a => Int -> [a] -> a -> (a -> [Property]) -> Int -> Int -> IO (Results a) Source #
A line of result for a single equivalence class of properties with the exact same surviving mutants.
Result | |
|
reduceImplications :: [Result a] -> [Result a] Source #
filterNonCanon :: [Result a] -> [Result a] Source #
data Conjecture Source #
Instances
Show Conjecture Source # | |
Defined in Test.FitSpec.Engine showsPrec :: Int -> Conjecture -> ShowS # show :: Conjecture -> String # showList :: [Conjecture] -> ShowS # |
conjectures :: [Result a] -> [Conjecture] Source #