Skip to content
mutastic

Swift edition

Errors

When mutastic can’t run, it says why in one sentence, in your words, then where it looked, and last the command to run instead, with your values in it, on stderr. It exits 2, or 3 when your tests fail without any mutant. This page is the errors a mistake on the command line gives, so you can tell at a glance what to fix; Troubleshooting has the ones a project gives, and Xcode projects the ones only Xcode gives.

A name that’s nearly an option’s gets the option it was close to, in the command you meant:

Terminal window
mutastic run samples/pricing --formt=agent
Terminal window
mutastic: run has no option --formt. There's one called --format.
mutastic run samples/pricing --format=agent
Terminal window
mutastic run samples/pricing --format=agnt
Terminal window
mutastic: --format has no value agnt. There's one called agent.
mutastic run samples/pricing --format=agent

A mutant’s id is m and eight hex digits. One that’s a slip away from a real one gets that one:

Terminal window
mutastic verify m86f9a31e samples/pricing
Terminal window
mutastic: m86f9a31e isn't a mutant of pricing. There's one called m86f9a31d.
mutastic verify m86f9a31d samples/pricing

mutastic mutants lists every mutant’s id; a card, next and explain name the one they’re about.

A directory named that doesn’t exist, mistyped say, is said as you typed it, with where it was looked for. Then what to test instead, and the command on it: a directory beside it a slip away from its name, else the package it would be in:

Terminal window
mutastic run samples/pricing/nosuch
Terminal window
mutastic: there's no directory samples/pricing/nosuch in /home/you/project.
The package there is pricing, in samples/pricing. To test it:
mutastic run samples/pricing

A name in mutastic.yaml mutastic doesn’t have is refused with the file’s line, and the one it was close to. Here samples/pricing/mutastic.yaml holds operators:, - defaults and - -strem:

Terminal window
mutastic run samples/pricing
Terminal window
mutastic: mutastic.yaml line 3: strem isn't an operator mutastic has. There's one called stream.
It takes a set (defaults, stronger, extended or all), a namespace (library, mutastic, optional, stream or swift) or an operator's id. To see each id:
mutastic mutants --operators=all

See a mistyped command.