expect: The building block of all 'expect_' functions

Description Usage Arguments Value

View source: R/expectation.R

Description

Call this function when writing your own expectations. See vignette("custom-expectation") for details.

Usage

1
expect(ok, failure_message, info = NULL, srcref = NULL)

Arguments

ok

TRUE or FALSE indicating if the expectation was successful.

failure_message

Message to show if the expectation failed.

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.

Value

An expectation object. Signals the expectation condition with a continue_test restart.


r-lib/testthat documentation built on May 1, 2019, 8:14 a.m.