Some of the classes and functions from the mockpp library might be of general use so they are listed in a chapter of their own.
A testing framework frequently uses assertions to check conditions of a running application. To be able to express the intention there is a bunch of functions that do special assertions.
Often you also want to provide the current filename and the source line to show the location in some kind of output. To avoid having to add this manually there are #define's under a similar name that do this automatically.
Some of the macros are self explanatory but some need a closer look. Here is a list of the most important ones:
MOCKPP_ASSERT_TRUE(condition); MOCKPP_ASSERT_FALSE(condition); MOCKPP_ASSERT_EQUALS(a, b); MOCKPP_ASSERT_DELTA(a, b, delta); MOCKPP_ASSERT_BOUNDARY(lo, up, a); MOCKPP_ASSERT_INCLUDES(substr, target); MOCKPP_ASSERT_EXCLUDES(substr, target); MOCKPP_ASSERT_STARTSWITH(substr, target); MOCKPP_ASSERT_THROWING(action, action_descr, exception, exception_data); MOCKPP_ASSERT_THROWING_COND(action, action_descr, exception, condition);
There are some more asserters which are of limited interest, see the api documentation for Assert.h and AssertMo.h for a complete list. There you find also a detailed description of the above macros and the functions behind them.