[Runit-help] Reusing unit test functions
Brought to you by:
burgerm
From: Iago M. <iag...@gm...> - 2007-03-05 09:43:21
|
Hello, I would like to re-use some of the test functions in an RUnit suite by calling them with different inputs. Can this be done? What is the best way of doing so? If I define test.foo <- function(object) { checkTrue(class(object), 'myclass') } How can this be called my runTestSuite for various object(s)? Should I instead do foo <- function(object) { checkTrue(class(object), 'myclass') } test.myclass <- function() { foo(new('myclass')) } and so on? Many thanks, Iago |