inst/tinytest/test-15-assert.R

setOutputLevel(OL$Info)

expect_null(assert(1 == 1, "Arithmetic failure"))
expect_stdout(assert(NA == NA, "NAs don't test equal to themselves", level=OL$Info), "NAs don't test equal to themselves")
# The case below produces an error
expect_stdout(assert(3 + "n", "Numeric and character vectors can't be added", level=Info), "Numeric and character vectors can't be added")

Try the reportr package in your browser

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

reportr documentation built on April 12, 2025, 1:49 a.m.