testthatFactory: A factory to produce 'testthat' code

Description Usage Value Note Author(s) References Examples

View source: R/testthatFactory.R

Description

Produces testthat code from an instrumented offensive programming object.

Usage

1

Value

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

Note

This function is provided for convenience. It may ease your own way to generate testthat code from an instrumented offensive programming object.

To put this package in action, simply use gautfo that offers a much more straightforward way to get results.

Author(s)

Fabien Gelineau <neonira@gmail.com>

Maintainer: Fabien Gelineau <neonira@gmail.com>

References

See EvaluationMode for more information.

Refer to test_file from package testthat.

Refer to runTestCase from package wyz.code.offensiveProgramming.

Examples

1
2
3
4
5
6
7
8
##---- typical example ----
rv <- testthatFactory()(c(call('isTRUE', TRUE), call('isFALSE', FALSE)), 'correct')
print(rv)
# [[1]]
# expect_true(isTRUE(TRUE))
#
# [[2]]
# expect_true(isFALSE(FALSE))

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