| with_srcref {testex} | R Documentation |
Raise testthat Expectations With A Known Source Reference
Description
Retroactively assigns a source file and location to a expectation. This
allows testthat to report an origin for any code that raised an example
test failure from the source roxygen2 code, even though the test code is
reconstructed from package documentation files.
Usage
with_srcref(src, expr, envir = parent.frame())
Arguments
src |
A |
expr |
An expression to be evaluated. If an |
envir |
An environment in which to evaluate |
Value
The result of evaluating expr, or an expectation with appended
srcref information if an expectation is raised.
[Package testex version 0.2.0 Index]