A set of functions used to check the results of some test
calculation. If these functions are called within the RUnit framework,
the results of the checks are stored and reported in the test
protocol. checkEquals compares two R objects by invoking all.equal on
the two objects. If the objects are not equal an error is
generated and the failure is reported to the test logger such that it
appears in the test protocol.
checkEqualsNumeric works just like checkEquals except
that it invokes all.equal.numeric instead of all.equal
checkTrue uses the function identical to check if the expression
provided as first argument evaluates to TRUE. If not, an error is
generated and the failure is reported to the test logger such that it
appears in the test protocol.
checkException evaluates the passed expression and uses the
try mechanism to check if the evaluation generates an error.
If it does the test is OK. Otherwise an error is
generated and the failure is reported to the test logger such that it
appears in the test protocol.
DEACTIVATED interrupts the test function and reports the test case
as deactivated. In the test protocol deactivated test functions are
listed separately. Test case deactivation can be useful in the case of
major refactoring. Alternatively, test cases can be commented out
completely but then it is easy to forget the test case altogether.