Skip to content
mutastic

Rust edition

mutastic mutants

List the mutants, without building or running anything. One line each: its id, place, operator, the change, and the function it's in. A mutant near unsafe code says why it's marked, and the last lines count what was left out. With --operators and --unsafe, it shows what those would add before a run.

Usage

Terminal window
mutastic mutants [dir]

Inside a package, cargo mutastic mutants runs the same command, with the same options.

Output

On the pricing fixture. This is mutastic's own output, written from the CLI and checked against it on every build.

Terminal window
mc9e13290 src/lib.rs:29:9 mutastic/return-value returns 1 instead in Pricing::discount
mb2f8ae57 src/lib.rs:26:18 mutastic/boundary >= becomes > in Pricing::discount
md56e8c39 src/lib.rs:26:12 mutastic/remove-conditional total >= 100 is always true in Pricing::discount
m1636f6d5 src/lib.rs:26:12 mutastic/remove-conditional total >= 100 is always false in Pricing::discount
m6d05659f src/lib.rs:27:20 mutastic/return-value returns 0 instead in Pricing::discount
m95f96847 src/lib.rs:27:26 mutastic/math / becomes * in Pricing::discount
m383e0002 src/lib.rs:37:9 mutastic/return-value returns 1 instead in Pricing::shipping
m7d92063c src/lib.rs:34:18 mutastic/boundary < becomes <= in Pricing::shipping
m3be6b420 src/lib.rs:34:12 mutastic/remove-conditional total < self.free_shipping_from is always true in Pricing::shipping
m89be540d src/lib.rs:34:12 mutastic/remove-conditional total < self.free_shipping_from is always false in Pricing::shipping
mbddcd9c4 src/lib.rs:35:20 mutastic/return-value returns 0 instead in Pricing::shipping
11 mutants

Exit status

0 once they're listed. Any command exits 2 when mutastic couldn't run: see exit codes.

Options

--operators=OPERATORS

Which operators run: a set (defaults, stronger or extended), or operator ids split by commas, in place of mutastic.yaml's operators; defaults unless set.

Command line--operators=OPERATORS

--unsafe=MODE

Which unsafe code is mutated: skip leaves unsafe code and the functions holding an unsafe block alone, enclosing mutates those functions too, all unsafe code as well; skip unless set.

One of skipenclosingall

Command line--unsafe=MODE

--edition=EDITION

Which edition runs; unless set, the build file in dir, or the nearest above it: Cargo.toml for rust, pom.xml, build.gradle or settings.gradle for java.

One of rustjava

Command line--edition=EDITION