Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArithmeticMutator ¶
type ArithmeticMutator struct{}
ArithmeticMutator mutates arithmetic operators (+, -, *, /).
func (*ArithmeticMutator) Name ¶
func (m *ArithmeticMutator) Name() string
type BooleanMutator ¶
type BooleanMutator struct{}
BooleanMutator mutates boolean operators (&&, ||).
func (*BooleanMutator) Name ¶
func (m *BooleanMutator) Name() string
type ComparisonMutator ¶
type ComparisonMutator struct{}
ComparisonMutator mutates comparison operators (==, !=, <, >, <=, >=).
func (*ComparisonMutator) Name ¶
func (m *ComparisonMutator) Name() string
type ConditionalsBoundaryMutator ¶
type ConditionalsBoundaryMutator struct{}
ConditionalsBoundaryMutator relaxes or tightens boundary checks (< ↔ <=, > ↔ >=).
func (*ConditionalsBoundaryMutator) Check ¶
func (m *ConditionalsBoundaryMutator) Check(n ast.Node) []Mutation
func (*ConditionalsBoundaryMutator) Name ¶
func (m *ConditionalsBoundaryMutator) Name() string
type IncrementDecrementMutator ¶
type IncrementDecrementMutator struct{}
IncrementDecrementMutator swaps ++ and --.
func (*IncrementDecrementMutator) Check ¶
func (m *IncrementDecrementMutator) Check(n ast.Node) []Mutation
func (*IncrementDecrementMutator) Name ¶
func (m *IncrementDecrementMutator) Name() string
type Mutation ¶
type Mutation struct {
ID string // Unique identifier for the mutation
Pos token.Pos // Position in the source file
Apply func() // Applies the mutation to the AST
Revert func() // Reverts the mutation
}
Mutation represents a single code mutation.
type Mutator ¶
type Mutator interface {
// Name returns the name of the mutator.
Name() string
// Check checks a node for possible mutations and returns them.
Check(n ast.Node) []Mutation
}
Mutator defines the interface for code mutations.
type ReverseIfCond ¶
type ReverseIfCond struct{}
ReverseIfCond negates the condition of an if statement.
func (*ReverseIfCond) Name ¶
func (m *ReverseIfCond) Name() string
Click to show internal directories.
Click to hide internal directories.