TestMe: Run tests defined in the current function

View source: R/RtestingHelpers.R

TestMeR Documentation

Run tests defined in the current function

Description

Searches the current function for test definitions, runs the tests and compares to expectations.

Usage

TestMe(mode = list(), which = -2)

Arguments

mode

list with modes of comparison. By default compare is used for the comparison. Elements with names of the test can overwrite the testing mode. Available modes are c('compare', 'round8', 'equal', 'error', 'image').

which

integer to indicate which environment relative to current is to be used to look for tests.

Value

undefined return value

Examples

## Not run: 
myTests = function() {
  T1 = 1 + 1;
  T2 = sqrt(exp(10));
  TestMe(list(T2 = 'round8'));
}

## End(Not run)

sboehringer/testme documentation built on Jan. 17, 2024, 4:58 p.m.