runner

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	StartLine int
	StartCol  int
	EndLine   int
	EndCol    int
	Count     int
}

Block represents a covered code block.

type Config

type Config struct {
	Verbose     bool
	MutationDir string
	Mutators    []mutator.Mutator
	Workers     int
	Seed        int64
	Shuffle     bool
	Timeout     time.Duration
}

type Coverage

type Coverage struct {
	Blocks map[string][]Block
}

Coverage represents code coverage data.

func LoadCoverage

func LoadCoverage(filename string) (*Coverage, error)

LoadCoverage loads coverage data from a profile file.

func (*Coverage) IsCovered

func (c *Coverage) IsCovered(filename string, line int) bool

IsCovered checks if a position is covered. Note: filename in coverage profile might be relative or absolute depending on how test was run. We assume simple matching for now.

type ParsedFile

type ParsedFile struct {
	Path string
	File *ast.File
	Fset *token.FileSet
}

type Report

type Report struct {
	Total         int
	Killed        int
	Timeouts      int
	Survived      int
	Uncovered     int
	BuildFailures int
	TestKills     map[string][]string // test name -> list of mutation IDs
}

func Run

func Run(patterns []string, config Config) (*Report, error)

Run executes the mutation testing process.

func (Report) Score

func (r Report) Score() float64

type TestEvent

type TestEvent struct {
	Time    time.Time
	Action  string
	Package string
	Test    string
	Elapsed float64
	Output  string
}

Jump to

Keyboard shortcuts

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