dies.ok: dies.ok

Description Usage Arguments Details Value Author(s) Examples

View source: R/test.R

Description

Test that an expression throws an error

Usage

1
dies.ok(call, regex, testname)

Arguments

call

An expression to evaluate

regex

A regular expression to match the error against. If omitted then don't test the exception text.

testname

A name for the test. Defaults to deparsing the call.

Details

Test that an expression throws an error.

Value

Runs one or two tests (the second test to match the error message against regex, if it was provided and if an error was successfully thrown).

Author(s)

Brad Friedman

Examples

1
dies.ok(stop("foo"), "foo", "it stops")

AnalysisPageServer documentation built on April 28, 2020, 6:32 p.m.