validate_and_run.test: Get result function

Description Usage Arguments Value Examples

Description

Returns the result function instead of the result of the result function.

Usage

1

Arguments

fn

The function to get the function result of.

...

Arguments for fn.

Value

The result function from the calling method.

Examples

1
2
3
4
5
6
7
8
fn <- function(a) {
  result <- function() helper()
  helper <- function() 2*a
  ShadowCAT:::validate_and_run()
}
tst <- ShadowCAT:::validate_and_run.test(fn, 4)
helper <- get('helper', environment(tst))
helper() == 8 || stop('error')

Karel-Kroeze/ShadowCAT documentation built on May 7, 2019, 12:28 p.m.