tmp <- tempfile("test-convert_test_file")
writeLines(
"test_truth <- function()
{
x <- all(runif(10) > 0)
checkTrue(x)
}
test_equality <- function()
{
x <- sqrt(1:5)
expected <- c(1, 4, 9, 16, 25)
checkEquals(expected, x ^ 4)
}
test_error <- function()
{
checkException('1' + '2')
}",
tmp
)
convert_test_file(tmp)
unlink(tmp)
Run the code above in your browser using DataLab