mtelib

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileResult

type FileResult struct {
	Language string         `json:"language"`
	Mutants  []MutantResult `json:"mutants"`
	Source   string         `json:"source"`
}

FileResult contains the files language, mutants and unedited source code.

type FileResultDictionary

type FileResultDictionary map[string]FileResult

FileResultDictionary is a dictionary that stores FileResults against their string file paths.

type Location

type Location struct {
	Start Position `json:"start"`
	End   Position `json:"end"`
}

Location describes a range within the source code. Start is inclusive, end is exclusive.

type MTE

type MTE struct {
	// contains filtered or unexported fields
}

func NewMTE

func NewMTE(file string) (*MTE, error)

func (*MTE) Mutations

func (m *MTE) Mutations() mutations.Mutations

func (*MTE) RawMutationsCount

func (m *MTE) RawMutationsCount() int

func (*MTE) ReadLines

func (m *MTE) ReadLines(file string) []string

func (*MTE) Transform

func (m *MTE) Transform(bar *progressbar.ProgressBar)

type MTEStatus

type MTEStatus string

type MutantResult

type MutantResult struct {
	ID          string    `json:"id"`
	MutatorName string    `json:"mutatorName"`
	Replacement string    `json:"replacement"`
	Location    Location  `json:"location"`
	Status      MTEStatus `json:"status"`
	Description string    `json:"description"`
}

MutantResult contains the data about a specific mutant.

type MutationTestResult

type MutationTestResult struct {
	SchemaVersion string               `json:"schemaVersion"`
	Files         FileResultDictionary `json:"files"`
}

MutationTestResult represents the main Mutation Testing Elements JSON file.

func (*MutationTestResult) CountMutations

func (m *MutationTestResult) CountMutations() int

type Position

type Position struct {
	Line   int `json:"line"`
	Column int `json:"column"`
}

Position describes a single position within the source code. Both line and column start at one.

Jump to

Keyboard shortcuts

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