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())
Value
The result of evaluating expr
, or an expectation with appended
srcref
information if an expectation is raised.