These macros can be used in the test case definition to report test information—including reporting the actual values of the variables.

MacroDefinition
CPPTEST_REPORT(txt)Reports given text message.
CPPTEST_REPORT_STACKTRACE(txt)Reports given text message with information about current execution stack trace.
CPPTEST_REPORT_BOOL(txt, value)Reports the given boolean 'value' using 'txt' for identification.
CPPTEST_REPORT_INTEGER(txt, value)Reports the given integer 'value' using 'txt' for identification.
CPPTEST_REPORT_UINTEGER(txt, value)Reports the given unsigned integer 'value' using 'txt' for identification.
CPPTEST_REPORT_FLOAT(txt, value)Reports the given floating point 'value' using 'txt' for identification.
CPPTEST_REPORT_CSTR(txt, value)Reports the given null-terminated string 'value' using 'txt' for identification.
CPPTEST_REPORT_CSTR_N(txt, value, max_size)Reports the given null-terminated string 'value' using 'txt' for identification. Only first 'max_size' characters are reported.

CPPTEST_REPORT_ENUM(scoped_enum_name, value)

Reports the given integral value as an enumeration identifier. If 'value' does not equal to one of enumerators defined in 'scoped_enum_name', an error is reported. See Handling Enum Values for details.

CPPTEST_REPORT_MEM_BUFFER(txt, value, size)Reports the given memory buffer 'value' using 'txt' for identification. First 'size' bytes of the buffer are reported.
CPPTEST_REPORT_PTR(txt, value)Reports the given pointer 'value' using 'txt' for identification.
  • No labels