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