mutagen-0.1.0.0: Property-based testing framework for Haskell using type-preserving mutations.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Mutagen.Mutant

Description

Abstract test case mutants and their concretization.

Synopsis

Abstract mutants

data Mutant a Source #

Mutants representing possibly unrealized mutations over values of type a.

Constructors

Pure a

A pure mutation obtained after applying a deterministic transformation

Rand (Gen a)

A random mutation obtained by sampling from a generator

Frag (FragmentStore -> Gen [a])

A fragment-based mutation obtained by sampling from a fragment store

Instances

Instances details
Functor Mutant Source # 
Instance details

Defined in Test.Mutagen.Mutant

Methods

fmap :: (a -> b) -> Mutant a -> Mutant b #

(<$) :: a -> Mutant b -> Mutant a #

Show (Mutant a) Source # 
Instance details

Defined in Test.Mutagen.Mutant

Methods

showsPrec :: Int -> Mutant a -> ShowS #

show :: Mutant a -> String #

showList :: [Mutant a] -> ShowS #

data MutantKind Source #

Kinds of concretized mutants.

Instances

Instances details
Show MutantKind Source # 
Instance details

Defined in Test.Mutagen.Mutant

Concretized test cases

data Concretized a Source #

Values obtained by concretizing a mutant.

Constructors

Concretized MutantKind a 

Instances

Instances details
Show a => Show (Concretized a) Source # 
Instance details

Defined in Test.Mutagen.Mutant

concretize Source #

Arguments

:: Typeable a 
=> (Int, Int)

Count and max generation size for random mutants

-> (Int, FragmentStore)

Count and fragment store for fragment mutants

-> Mutant a

Mutant to concretize

-> IO [Concretized a] 

Turn an abstract mutant into a concrete set of values.

Re-exports

data Gen a Source #

A generator for values of type a.

The third-party packages QuickCheck-GenT and quickcheck-transformer provide monad transformer versions of Gen.

Instances

Instances details
Applicative Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

pure :: a -> Gen a #

(<*>) :: Gen (a -> b) -> Gen a -> Gen b #

liftA2 :: (a -> b -> c) -> Gen a -> Gen b -> Gen c #

(*>) :: Gen a -> Gen b -> Gen b #

(<*) :: Gen a -> Gen b -> Gen a #

Functor Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

fmap :: (a -> b) -> Gen a -> Gen b #

(<$) :: a -> Gen b -> Gen a #

Monad Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

(>>=) :: Gen a -> (a -> Gen b) -> Gen b #

(>>) :: Gen a -> Gen b -> Gen b #

return :: a -> Gen a #

MonadFix Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

mfix :: (a -> Gen a) -> Gen a #

Testable prop => Testable (Gen prop) 
Instance details

Defined in Test.QuickCheck.Property

Methods

property :: Gen prop -> Property Source #

propertyForAllShrinkShow :: Gen a -> (a -> [a]) -> (a -> [String]) -> (a -> Gen prop) -> Property Source #

data FragmentStore Source #

A collection of fragments indexed by their type representation.