tests/test_suppressWarnings.R

source("helper/helper.R")

if (getRversion() >= "4.0.0") {
  f = get("suppressWarnings", envir = baseenv())
  expect_same = makeCompareFun(f, backports:::suppressWarnings)

  expect_same(suppressWarnings(backports:::warningCondition("foo", "testWarning")), classes = "testWarning")
}

Try the backports package in your browser

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

backports documentation built on June 24, 2024, 5:24 p.m.