For all files with names of the form "^test_.+\.R$" in the package directory unit_tests run all functions with names of the form "^test_.+$" as RUnit tests. Attaches RUnit and pkg, requires RUnit. Stops on error.

run_package_tests(pkg, ..., verbose = TRUE, test_dir = NULL,
  stop_on_issue = TRUE, stop_if_no_tests = TRUE)

Arguments

pkg

character, name of package to test.

...

not used, force later arguments to bind by name.

verbose

logical, if TRUE print more.

test_dir

directory to look for tests in, if not set looks in pacakge unit_tests.

stop_on_issue

logical, if TRUE stop after errors or failures.

stop_if_no_tests

logical, if TRUE stop if no tests were found.

Value

nothing

Details

Based on https://github.com/RcppCore/Rcpp/blob/master/tests/doRUnit.R.