Nothing
context("generated messages")
test_that("No extra strings attached to generated error messages", {
foo = function(XX) assertFlag(XX)
x = try(foo(iris), silent = TRUE)
expect_error(foo(iris), "^Assertion on 'XX'")
expect_error(foo(iris), "not 'data.frame'\\.$")
})
test_that("Correct frame is reported by assertions", {
f1a <- function(num) if(!is.numeric(num)) stop("Not numeric")
f1b <- function(num) assert_numeric(num)
f2a <- function(num) f1a(num)
f2b <- function(num) f1b(num)
ok.r = try(f2a(letters), silent = TRUE)
ok.cm = try(f2b(letters), silent = TRUE)
expect_true(grepl("f1a(num)", as.character(ok.r), fixed = TRUE))
expect_true(grepl("f1b(num)", as.character(ok.cm), fixed = TRUE))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.