gentest: Test a function with different combinations of arguments,...

Description Usage Arguments Value

View source: R/core.R

Description

Test a function with different combinations of arguments, possibly generated randomly

Usage

1
gentest(..f, ..p = identity, ...)

Arguments

..f

A non-anonymous function to be tested (and possibly to be later documented with docgen).

..p

An optional function with one argument (i.e. arity 1) to be applied to the value retunred by function f. By default p = identity. Useful for applying additional tests/checks that do not have to or should not be included in function f.

...

Different values to be applied as arguments under different calls of function f. If vectors are to be used as single objects (rather than single value by value) they should be wrapped in a list, or AsOne (an alias for list for clarity), or Replicate.

Value

A data.frame (S3 class gentest_result) for all the combinations of argument values specified in ..., including:


alekrutkowski/gentest documentation built on May 10, 2017, 11:12 p.m.