inst/examples/example-class-expectations.R

# Test to make sure an object is not of a class.
\dontrun{
# will return an error.
expect_is_not(1L, "numeric")
}

# but this is fine.
expect_is_not('a', "numeric")

expect_is_exactly('a', "character")

Try the testextra package in your browser

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

testextra documentation built on Dec. 18, 2019, 9:38 a.m.