View source: R/mutator-presets.R
| numeric_literals | R Documentation |
Returns a ready-made list of numeric_increment() and numeric_decrement()
mutators that shift every numeric literal by 1.
numeric_literals()
Use on any file with numeric constants used as thresholds, counts, or offsets. A surviving mutant means tests never verify the exact value of the constant — asserting the precise numeric result rather than a property (e.g. sign) kills it.
A list of 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.
numeric_literals()
## Not run:
plan <- muttest_plan(
source_files = "R/thresholds.R",
mutators = numeric_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.