svTestData {svUnit} | R Documentation |
The 'svTestData' contains results of test run. The checkxxx()
functions
and the runTest()
method generate one such object which is located in
the .Log
object in .GlobalEnv. It is then possible to display and
report information it contains in various ways to analyze the results.
is.svTestData(x) stats(object, ...) ## S3 method for class 'svTestData' stats(object, ...) ## S3 method for class 'svTestData' print(x, all = FALSE, header = TRUE, file = "", append = FALSE, ...) ## S3 method for class 'svTestData' summary(object, header = TRUE, file = "", append = FALSE, ...)
x |
any kind of object, or a 'svTestData' object in the case of
|
object |
a 'svTestData' object. |
all |
do we print concise report for all test, or only for the tests that fail or produce an error? |
header |
do we print a header or not? |
file |
character. The path to the file where to write the report. If
|
append |
do we append to this file? |
... |
further arguments to pass to methods. Not used yet. |
is.svTestData()
returns TRUE
if the object is an 'svTestData'.
The various methods serve to extract or print content in the object.
Philippe Grosjean <phgrosjean@sciviews.org>
svTest
, svSuiteData
, check
,
Log
foo <- function(x, y = 2) return(x * y) is.test(foo) # No ## Create test cases for this function test(foo) <- function () { checkEqualsNumeric(4, foo(2)) checkEqualsNumeric(5, foo(2, 3)) checkEqualsNumeric(5, foo(nonexists)) } ## Generate a 'svTestData' object by running the test obj <- runTest(foo) # Equivalent to runTest(test(foo)), but shorter obj summary(obj) stats(obj) is.svTestData(obj) rm(foo, obj)