tests/testthat/test_tcwarn.R

test_that("tcwarn works as expected", {
  
  expect_warning( tcwarn({ NULL = 1 },'Cannot assign to NULL','variable') , 'Cannot assign to NULL variable' )
  expect_warning(  tcwarn({ as.numeric('abc') },'Issue in as.numeric()') , 'Issue in as.numeric()' )

})

Try the easyr package in your browser

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

easyr documentation built on March 31, 2023, 6:22 p.m.