inst/examples/operators/tests/testthat/test-calculate.R

test_that("calculate returns a numeric", {
  expect_true(is.numeric(calculate(2, 2))) # ❌ This assertion doesn't kill mutants
})

test_that("calculate always returns 0", {
  expect_equal(calculate(2, 2), 0) # ✅ This assertion only kills "*" -> "/" mutant
})

Try the muttest package in your browser

Any scripts or data that you put into this service are public.

muttest documentation built on June 8, 2025, 9:32 p.m.