tests/testthat/helper-legacy-objectives.R

# Loss-only regressions intentionally retain the historical criterion.
# Assert its deprecation explicitly instead of treating it as an ordinary API.
expect_legacy_min_loss <- function(...) {
  withr::local_options(lifecycle_verbosity = "warning")
  testthat::expect_warning(
    objective <- multiscape::add_objective_min_loss(...),
    class = "lifecycle_warning_deprecated"
  )
  objective
}

Try the multiscape package in your browser

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

multiscape documentation built on Oct. 12, 2026, 5:08 p.m.