Run unit tests in a variety of settings. This is still very experimental.
utest(x, ...)# S4 method for `function`
utest(x, run = TRUE)
# S4 method for character
utest(
x,
filter = "^runit.+\\.[rR]$",
fun = "^test\\.",
...,
testdir = "tests",
framework = c("RUnit", "testthat"),
quiet = Sys.getenv("RCMDCHECK") != "FALSE",
lib.loc = NULL
)
# S4 method for RUnitTestSuite
utest(x, ..., quiet = FALSE, outdir = NULL)
Returns the result object returned by the unit-test suite executer.
object to which a unit test is attached
extra arguments to allow extensions and are passed to the unit framework running funcitons.
a logical that indicates if the unit test should be run
pattern to match files that contain the definition of the unit tests functions to run.
patter to match the test functions to run.
directory where to look for the test files
unit test framework
a logical that indicates if the tests should be run silently
path to a library where installed packages are searched for.
Used is of the form x='package:*'
.
output directory
utest(`function`)
: Run the unit test assoicated to a function.
utest(character)
: Run a package test suite
utest(RUnitTestSuite)
: Runs a RUnit test suite