tests/testthat/test-is-type-methods.R

test_that("test.is_class.lm_numeric_raster.returns_true", {
  x <- c("lm", "numeric", "raster")
  expected <- c(TRUE, TRUE, FALSE)
  names(expected) <- x
  expect_equal(is_class(x), expected)
})

Try the assertive.types package in your browser

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

assertive.types documentation built on May 1, 2019, 10:31 p.m.