mutator

package
v0.0.0-...-6d92170 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2021 License: MIT Imports: 4 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List() []string

List returns a list of all registered mutator names.

func Register

func Register(name string, mutator Mutator)

Register registers a mutator instance function with the given name.

Types

type Mutation

type Mutation struct {
	// Change is called before executing the exec command.
	Change func()
	// Reset is called after executing the exec command.
	Reset func()
}

Mutation defines the behavior of one mutation

type Mutator

type Mutator func(pkg *types.Package, info *types.Info, node ast.Node) []Mutation

Mutator defines a mutator for mutation testing by returning a list of possible mutations for the given node.

func New

func New(name string) (Mutator, error)

New returns a new mutator instance given the registered name of the mutator. The error return argument is not nil, if the name does not exist in the registered mutator list.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL