MuCheck-0.2.1.0: Automated Mutation Testing

Safe HaskellNone
LanguageHaskell2010

Test.MuCheck.Config

Description

Configuration module

Synopsis

Documentation

data GenerationMode Source

The knob controlling if we want first order mutation.

data Config Source

The configuration options if 1 is provided, all mutants are selected for that kind, and 0 ensures that no mutants are picked for that kind. Any fraction in between causes that many mutants to be picked randomly from the available pool

Constructors

Config 

Fields

muOps :: [MuOp]

Mutation operators on operator or function replacement

doMutatePatternMatches :: Rational

Mutate pattern matches for functions? for example

first [] = Nothing
first (x:_) = Just x

is mutated to

first (x:_) = Just x
first [] = Nothing
doMutateValues :: Rational

Mutates integer values by +1 or -1 or by replacing it with 0 or 1

doNegateIfElse :: Rational

negate if conditions, that is

if True then 1 else 0

becomes

if (not True) then 1 else 0
doNegateGuards :: Rational

negate guarded booleans in case statements, that is

case v of
  True -> 1
  otherwise -> 0

becomes

case v of
 (not True) -> 1
 otherwise -> 0
maxNumMutants :: Int

Maximum number of mutants to generate.

genMode :: GenerationMode

Generation mode, can be traditional (firstOrder) and higher order (higher order is experimental)

Instances

defaultConfig :: Config Source

The default configuration

data MuVars Source

Enumeration of different kinds of mutations

getSample :: MuVars -> Config -> Rational Source

getSample returns the fraction in config corresponding to the enum passed in