string_literals: String literal mutators

View source: R/mutator-presets.R

string_literalsR Documentation

String literal mutators

Description

Returns a ready-made list of string_empty() and string_fill() mutators covering both directions: collapsing non-empty strings to "" and filling empty strings with a placeholder.

Usage

string_literals()

Details

Use on any file where string values are passed to downstream logic or returned to callers. Surviving mutants reveal tests that only check type or length — asserting the exact string content kills them.

Value

A list of mutators.

See Also

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.

Examples

string_literals()

## Not run: 
plan <- muttest_plan(
  source_files = "R/labels.R",
  mutators = string_literals()
)
muttest(plan, "tests/testthat")

## End(Not run)

muttest documentation built on May 14, 2026, 5:10 p.m.