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

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

Arguments

ok TRUE or FALSE indicating if the expectation was successful. Message to show if the expectation failed. Character vector continuing additional information. Included for backward compatibility only and new expectations should not use it. 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.