expectation {testthat} | R Documentation |
You generate an expectation object with expectation
, and signal
an expectation with expect
. If you're making your own expectation
function, you'll typically call expect(condition, "failure message")
.
See the source code for the built-in expectations for details.
expectation(type, message, srcref = NULL) expect(exp, ..., srcref = NULL) is.expectation(x)
message |
A text description of failure |
srcref |
Source reference, if known |
x |
object to test for class membership |
passed |
a single logical value indicating whether the test passed
( |