x <- 1L
test_that("TRUE", {
expect_true(isAll(x, classes = c("integer", "numeric")))
})
test_that("FALSE", {
ok <- isAll(x, classes = c("integer", "NULL"))
expect_false(ok)
expect_s4_class(ok, "goalie")
expect_identical(
object = cause(ok),
expected = "{.var 1} is not all of: integer, NULL."
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.