testthat (version 1.0.2)

expectation: Expectation class.

Description

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.

Usage

expectation(type, message, srcref = NULL)

expect(exp, ..., srcref = NULL)

is.expectation(x)

Arguments

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 (TRUE), failed (FALSE), or threw an error (NA)