dies.ok {AnalysisPageServer} | R Documentation |
Test that an expression throws an error
dies.ok(call, regex, testname)
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. |
Test that an expression throws an error.
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).
Brad Friedman
dies.ok(stop("foo"), "foo", "it stops")