Learn R Programming

pkgmaker (version 0.10.1)

utest: Running Unit Tests

Description

Run unit tests in a variety of settings. This is still very experimental.

Usage

utest(x, ...)

## S3 method for class 'function': utest(x, run = TRUE)

## S3 method for class 'character': utest(x, filter = "^runit.+\\\\.[rR]$", fun = "^test\\\\.", ..., testdir = "tests", framework = c("RUnit", "testthat"), quiet = Sys.getenv("RCMDCHECK") != "FALSE", lib.loc = NULL)

## S3 method for class 'RUnitTestSuite': utest(x, ..., quiet = FALSE, outdir = NULL)

Arguments

x
object to which a unit test is attached
...
extra arguments to allow extensions and are passed to the unit framework running funcitons.
run
a lgoical that indicates if the unit test should be run
filter
pattern to match files that contain the definition of the unit tests functions to run.
fun
patter to match the test functions to run.
testdir
directory where to look for the test files
framework
unit test framework
quiet
a logical that indicates if the tests should be run silently
lib.loc
path to a library where installed packages are searched for. Used is of the form x='package:*'.
outdir
output directory