Learn R Programming

wyz.code.offensiveProgramming (version 1.1.24)

TestCaseDefinition: Test Case Definition

Description

Defines a test case

Usage

TestCaseDefinition(params_l, expectedResult_, description_s_1)

Value

An object that is an R

environment class.

Arguments

params_l

a list that holds the test case input values

expectedResult_

test case expected result. This will be used to compare with function execution results

description_s_1

a single entry character vector, that is the test case description string

Author

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

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

See Also

Refer to FunctionParameterTypeFactory

Examples

Run this code
##---- typical case ----
tcd <- TestCaseDefinition(list(1:5), 15, 'sum of 5 first non nul integers')
tcd <- TestCaseDefinition(list(1:7, 3:5, sample(1:100, 19, FALSE)),
                          list(3:5), 'extract smallest length from input')

Run the code above in your browser using DataLab