comparisonreplace

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComparisonReplace

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

func New

func New() *ComparisonReplace

New returns a new ComparisonReplace virus.

It replaces the left and right sides of an `&&` comparison with `true` and the left and right sides of an `||` with false. E.g. `1 == 1 && 2 == 2` gets two mutations: `true && 2 == 2` and `1 == 1 && true`.

func (*ComparisonReplace) Incubate

func (v *ComparisonReplace) Incubate(node ast.Node) []*viruses.Infection

Jump to

Keyboard shortcuts

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