Learn R Programming

wyz.code.offensiveProgramming (version 1.1.24)

retrieveTestCaseDefinitions: Retrieve test case definitions or test case descriptions.

Description

From an instrumented class, retrieve the test case definitions or descriptions.

Usage

retrieveTestCaseDefinitions(object_o_1)
retrieveTestCaseDescriptions(object_o_1)

Value

For function, retrieveTestCaseDefinitions, a polymorphic return that is either

a list

as returned by the verifyObjectNames function

another list

as returned by the verifyFunctionReturnTypesDefinition function

a data.table

the test case definitions as declared in the source class

For function, retrieveTestCaseDescriptions, either a character vector when no test case definitions exists or a data.table of the test case descriptions.

Arguments

object_o_1

the object to consider

Author

tools:::Rd_package_author("wyz.code.offensiveProgramming")

Maintainer: tools:::Rd_package_maintainer("wyz.code.offensiveProgramming")

See Also

Refer to defineEvaluationModes.

Examples

Run this code
##---- typical case ----
library('data.table')
source(system.file('code-samples/tcd-defs/good/partial/AdditionTCPartial.R',
                   package = 'wyz.code.offensiveProgramming'))
source(system.file('code-samples/no-defs/Addition.R',
                   package = 'wyz.code.offensiveProgramming'))
retrieveTestCaseDefinitions(AdditionTCPartial()) # works, renders a data.table
retrieveTestCaseDefinitions(Addition()) # fails, renders a list

retrieveTestCaseDescriptions(Addition())
retrieveTestCaseDescriptions(AdditionTCPartial())

Run the code above in your browser using DataLab