View source: R/MxUnitTesting.R
omxCheckWarning | R Documentation |
This function tests whether the correct warning message is thrown. Arguments ‘expression’ and ‘message’ give the expression that generates the warning and the message that is supposed to be generated, respectively.
omxCheckWarning(expression, message)
expression |
an R expression that produces a warning |
message |
a character string with the desired warning message |
note: to test for no warning, set message = NA
.
The OpenMx User's guide can be found at <https://openmx.ssri.psu.edu/documentation>.
omxCheckError
omxCheckWithinPercentError
,
omxCheckIdentical
, omxCheckSetEquals
,
omxCheckTrue
, omxCheckEquals
foo <- omxCheckWarning(mxFIMLObjective('cov', 'mean'), "deprecated")
# Test for no warning
omxCheckWarning(2+2, message = NA)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.