with_srcref | R Documentation |
testthat
Expectations With A Known Source ReferenceRetroactively 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.
with_srcref(src, expr, envir = parent.frame())
src |
A |
expr |
An expression to be evaluated. If an |
envir |
An environment in which to evaluate |
The result of evaluating expr
, or an expectation with appended
srcref
information if an expectation is raised.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.