| expectation | R Documentation |
new_expectation() creates an expectation condition object and
exp_signal() signals it. expectation() does both. is.expectation()
tests if a captured condition is a testthat expectation.
These functions are primarily for internal use. If you are creating your
own expectation, you do not need these functions are instead should use
pass() or fail(). See vignette("custom-expectation") for more
details.
expectation(type, message, ..., srcref = NULL, trace = NULL)
new_expectation(
type,
message,
...,
srcref = NULL,
trace = NULL,
.subclass = NULL
)
exp_signal(exp)
is.expectation(x)
type |
Expectation type. Must be one of "success", "failure", "error", "skip", "warning". |
message |
Message describing test failure |
... |
Additional attributes for the expectation object. |
srcref |
Optional |
trace |
An optional backtrace created by |
.subclass |
An optional subclass for the expectation object. |
exp |
An expectation object, as created by
|
x |
object to test for class membership |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.