tests/testthat/tests/testthat_xxx/test_AdditionTCFIG1-generateWarning.R

source(system.file("code-samples/both-defs/good/full/AdditionTCFIG1.R", package = "wyz.code.offensiveProgramming"))
object_o_1 <- AdditionTCFIG1()
emsre <- EvaluationMode("standard_R_evaluation")
rtcsre22 <- runTestCase(object_o_1, 22, emsre)

test_that('generateWarning', {

# test 22 - generate warning - correct
expect_true(rtcsre22$synthesis$status)
expect_true(rtcsre22$synthesis$value_check)

})

emtce <- EvaluationMode("type_checking_enforcement")
rtctce22 <- runTestCase(object_o_1, 22, emtce)

test_that('generateWarning', {

# test 22 - generate warning - correct
expect_true(rtctce22$synthesis$status)
expect_true(rtctce22$synthesis$value_check)

})

Try the wyz.code.testthat package in your browser

Any scripts or data that you put into this service are public.

wyz.code.testthat documentation built on Oct. 6, 2021, 9:07 a.m.