testthat_roclet: Roclet: make testthat test-files.

Description Usage Value See Also Examples

View source: R/testthat_roclet.R

Description

This roclet is a workhorse of roxytest, producing the testthat test files specified.

Generally you will not call this function directly but will instead use roxygen2::roxygenise() specifying this roclet.

Usage

1

Value

A roclet to be used e.g. with roxygen2::roxygenise()

See Also

Other roclets: param_roclet, examples_roclet, return_roclet, tinytest_roclet, namespace_roclet, rd_roclet, vignette_roclet.

Other roclets: examples_roclet(), param_roclet(), return_roclet(), tinytest_roclet()

Examples

1
2
3
4
x <- "#' @tests\n#' expect_equal(2, 2)\nNULL\n"
cat(x)
o <- roxygen2::roc_proc_text(testthat_roclet(), x)
cat(o$tests[[1]])

roxytest documentation built on July 2, 2020, 1:55 a.m.