search for: sometestfunction

Displaying 1 result from an estimated 1 matches for "sometestfunction".

2010 Dec 17
0
How to use the RUnit tracker in unit tests?
...tests? I have read the RUnit Vignette, help pages and searched around, but I could find no examples of using 'inspect' in the unit test functions. Moreover, doing so, I tried something like library(RUnit) myFunction <- function(x) { return(x) } track <- tracker() track$init() test.someTestFunction <- function() { y <- 10 res <- inspect(myFunction(y), track = track) checkEquals(res, 10) } which works fine, when calling test.someTestFunction() from the command line, but embedded in a test suite, I get Error in eval(expr, envir, enclos) : object 'y' not found Another...