Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Types = []Type{ ArithmeticBase, ConditionalsBoundary, ConditionalsNegation, InvertAssignments, InvertBitwise, InvertBitwiseAssignments, IncrementDecrement, InvertLogical, InvertLoopCtrl, InvertNegatives, RemoveSelfAssignments, }
Types allows to iterate over Type.
Functions ¶
This section is empty.
Types ¶
type Mutator ¶
type Mutator interface {
// Type returns the Type of the Mutator.
Type() Type
// SetType sets the Type of the Mutator.
SetType(mt Type)
// Status returns the Status of the Mutator.
Status() Status
// SetStatus sets the Status of the Mutator.
SetStatus(s Status)
// Position returns the token.Position for the Mutator.
// token.Position consumes more space than token.Pos, and in the future
// we can consider a refactoring to remove its use and only use Mutator.Pos.
Position() token.Position
// Pos returns the token.Pos of the Mutator.
Pos() token.Pos
// Pkg returns the package where the Mutator is fount.
Pkg() string
// SetWorkdir sets the working directory which contains the source code on
// which the Mutator will apply its mutations.
SetWorkdir(p string)
// Workdir returns the current working dir in which the Mutator will apply its mutations
Workdir() string
// Apply applies the mutation on the actual source code.
Apply() error
// Rollback removes the mutation from the source code and sets it back to
// its original status.
Rollback() error
}
Mutator represents a possible mutation of the source code.
type Status ¶
type Status int
Status represents the status of a given TokenMutant.
- NotCovered means that a TokenMutant has been identified, but is not covered by tests.
- Runnable means that a TokenMutant has been identified and is covered by tests, which means it can be executed.
- Lived means that the TokenMutant has been tested, but the tests did pass, which means the test suite is not effective in catching it.
- Killed means that the TokenMutant has been tested and the tests failed, which means they are effective in covering this regression.
Currently supported MutantStatus.
type Type ¶
type Type int
Type represents the category of the TokenMutant.
A single token.Token can be mutated in various ways depending on the specific mutation being tested. For example `<` can be mutated to `<=` in case of ConditionalsBoundary or `>=` in case of ConditionalsNegation.
Click to show internal directories.
Click to hide internal directories.