R

Rcpp with testthat and catch unit testing

The issue System This has been tested with R version 3.5.3 in RStudio 1.2.1335, using the following packages: usethis: 1.5.0 testthat: 2.0.1 Rcpp: 1.0.1 devtools: 2.0.2 Apparantly, in R version 3.2.x this approach would not work, with a reference to RcppExport SEXP run_testthat_tests(); not being created in RcppExports.cpp Setting up > library(usethis) > create_package("~/test/mypackage") ... > roxygen2::roxygenize() > library(usethis) > use_rcpp() > use_mit_license("my name") Create a mypackage-package.R file with the following contents: