OpenMx (version 2.17.3)

omxCheckWarning: Correct Warning Message Function

Description

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.

Usage

omxCheckWarning(expression, message)

Arguments

expression

an R expression that produces a warning

message

a character string with the desired warning message

Details

note: to test for no warning, set message = NA.

References

The OpenMx User's guide can be found at http://openmx.ssri.psu.edu/documentation.

See Also

omxCheckError omxCheckWithinPercentError, omxCheckIdentical, omxCheckSetEquals, omxCheckTrue, omxCheckEquals

Examples

Run this code
# NOT RUN {
foo <- omxCheckWarning(mxFIMLObjective('cov', 'mean'), "deprecated")

# Test for no warning
omxCheckWarning(2+2, message = NA)

# }

Run the code above in your browser using DataLab