View source: R/mutator-presets.R
| boolean_literals | R Documentation |
Returns a ready-made list of boolean_literal() mutators covering all
canonical flips: TRUE/FALSE and T/F.
boolean_literals()
Use on any file that passes or returns boolean flags. A surviving mutant from
this preset typically means a test checks a side effect of the flag (e.g.
the branch taken) rather than the flag value itself — adding
expect_true()/expect_false() on the return value kills it.
A list of boolean_literal() mutators.
vignette("mutators", package = "muttest") for the full mutator table.
vignette("interpreting-results", package = "muttest") for how to
diagnose survivors and fix the underlying test weakness.
boolean_literals()
## Not run:
plan <- muttest_plan(
source_files = "R/flags.R",
mutators = boolean_literals()
)
muttest(plan, "tests/testthat")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.