Learn R Programming

wyz.code.testthat (version 1.1.20)

testthatFactory: A factory to produce testthat code

Description

Produces testthat code from an instrumented offensive programming object.

Usage

testthatFactory()

Arguments

Value

Returns a function that manages dispatch depending on targeted offensive programming object test case evaluation mode value.

References

See EvaluationMode for more information.

Refer to test_file from package testthat.

Refer to runTestCase from package wyz.code.offensiveProgramming.

Examples

Run this code
# NOT RUN {
##---- typical example ----
rv <- testthatFactory()(c(call('isTRUE', TRUE), call('isFALSE', FALSE)), 'correct')
print(rv)
# [[1]]
# expect_true(isTRUE(TRUE))
#
# [[2]]
# expect_true(isFALSE(FALSE))
# }

Run the code above in your browser using DataLab