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

Description Usage Arguments Value

View source: R/core.R


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


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



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


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.


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.