runTestCase: Run test cases

View source: R/runTestCase.R

runTestCaseR Documentation

Run test cases

Description

Run specified test cases under the given evaluation mode

Usage

runTestCase(object_o_1, testCaseIndexes_i, evaluationMode_o_1 = EvaluationMode())

Arguments

object_o_1

The R object to consider

testCaseIndexes_i

a vector of numbers identifying the test cases to run

evaluationMode_o_1

the evaluation mode to use. see EvaluationMode

Value

A list with two names

raw

a list with one entry for each test ran, holding all data and metadata related to the test

synthesis

a summary data.table that allows to see at a glance all the tests results. Also eases comparisons of results between various evaluation modes.

Author(s)

Fabien Gelineau <neonira@gmail.com>

Maintainer: Fabien Gelineau <neonira@gmail.com>

See Also

Refer to defineEvaluationModes.

Examples

##---- typical case ----
library('data.table')
source(system.file('code-samples/both-defs/good/full/AdditionTCFI_G1.R',
                   package = 'wyz.code.offensiveProgramming'))
em <- EvaluationMode('type_checking_enforcement')
runTestCase(AdditionTCFI_G1(), c(3, 5, 7), em)

wyz.code.offensiveProgramming documentation built on Sept. 25, 2023, 9:05 a.m.