tests/testthat/test-stopwarn.R

library(testthat)

context("stopwarn")

test_that("warn",{
  expect_warning(stopwarn("warn", "This number is too big"))
})

test_that("stop",{
  expect_error(stopwarn("stop", "This number is too big"))
})
RaphaelS1/RSmisc documentation built on June 7, 2019, 8:20 p.m.