CppUnit provides several variations on the basic assert method. The assert methods are implemented as macros. The advantage of using macros to implement assert methods is that they enable the compiler preprocessor to record the source code location of each assert, which is otherwise hard to do in C.
As in other xUnits, some of the asserts have variants that take a descriptive message argument. The message is reported if the test fails. Examples of these variants are shown in the following list: