For advanced use only. If you are creating your own expectation, you should
call expect()
instead. 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 |
srcref | Optional |
trace | An optional backtrace created by |
... | Additional attributes for the expectation object. |
.subclass | An optional subclass for the expectation object. |
exp | An expectation object, as created by
|
x | object to test for class membership |
Create an expectation with expectation()
or new_expectation()
and signal it with exp_signal()
.