## ----include = FALSE---------------------------------------------------------- knitr::opts_chunk$set( message = FALSE, digits = 3, collapse = TRUE, comment = "#>" ) options(digits = 3) ## ----------------------------------------------------------------------------- # Create the longtests directory and .BBSoptions file biocroxytest::use_longtests() ## ----------------------------------------------------------------------------- #' A function to do x #' #' @param x A number #' #' @longtests #' expect_equal(foo(2), sqrt(2)) #' expect_error(foo("a string")) #' #' @return something foo <- function(x) { return(sqrt(x)) } ## ----results='hide'----------------------------------------------------------- # Generated by biocroxytest: do not edit by hand! # File R/functions.R: @longtests testthat::test_that("Function foo() @ L11", { testthat::expect_equal(foo(2), sqrt(2)) testthat::expect_error(foo("a string")) }) ## ----------------------------------------------------------------------------- utils::sessionInfo()