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. We now suggest using tinytest
instead of this and RUnit
.
run_package_tests(
pkg,
...,
verbose = TRUE,
package_test_dirs = "unit_tests",
test_dirs = character(0),
stop_on_issue = TRUE,
stop_if_no_tests = TRUE,
require_RUnit_attached = FALSE,
require_pkg_attached = TRUE,
rngKind = "Mersenne-Twister",
rngNormalKind = "Inversion"
)
character, name of package to test.
not used, force later arguments to bind by name.
logical, if TRUE print more.
directory names to look for in the installed package.
paths to look for tests in.
logical, if TRUE stop after errors or failures.
logical, if TRUE stop if no tests were found.
logical, if TRUE require RUnit be attached before testing.
logical, if TRUE require pkg be attached before testing.
pseudo-random number generator method name.
pseudo-random normal generator method name.
RUnit test results (invisible).
Based on Rcpp/doRUnit.R
. This
version is GPL-3, works derived from it must be distributed GPL-3.