| expect | R Documentation |
expect_ functionsPreviously, we recommended using expect() when writing your own
expectations. Now we instead recommend pass() and fail(). See
vignette("custom-expectation") for details.
expect(
ok,
failure_message,
info = NULL,
srcref = NULL,
trace = NULL,
trace_env = caller_env()
)
ok |
|
failure_message |
A character vector describing the failure. The first element should describe the expected value, and the second (and optionally subsequence) elements should describe what was actually seen. |
info |
Character vector continuing additional information. Included for backward compatibility only and new expectations should not use it. |
srcref |
Location of the failure. Should only needed to be explicitly supplied when you need to forward a srcref captured elsewhere. |
trace |
An optional backtrace created by |
trace_env |
If |
An expectation object from either succeed() or fail().
with a muffle_expectation restart.
exp_signal()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.