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 Dec. 13, 2021, 5:08 p.m.