Unit Test Framework C and Traditional C++ API Reference
Logging

The tests themselves may output logging. When running a test, the test logs use a separate, and simplified, infrastructure from the modules being tested. It is up to the unit test writer to use these APIs consistently. RTITestLogger_log and derived macros are the main logging APIs to be used in tests, but RTITestConnextLogger_log and derived macros can be used instead if Connext logging's features are needed within the test. More...

Modules

 Log Bitmap
 Several definitions to handle Unit Test Framework verbosity with high granularity.
 
 Log Verbosity
 Several definitions to handle Unit Test Framework verbosity.
 
 Log Templates
 Log templates used in the log functions. The names of the templates are self-descriptive.
 

Functions

void void RTITestLog_setBitmaps (RTITestLogBitmap instrumentationMask)
 Sets current log verbosity based on the provided bitmap. See RTITestLog_setBitmapsFromVerbosity() as an alternative. More...
 
void RTITestLog_getBitmaps (RTITestLogBitmap *instrumentationMask)
 Gets current log verbosity. More...
 
void RTITestLog_setBitmapsFromVerbosity (unsigned int verbosity)
 Sets log verbosity from a number, enabling several bitmaps at the same time. See the RTI_TEST_LOG_VERBOSITY macros in Log Verbosity for mapping to the bitmaps. This is a convenience function that calls RTITestLog_setBitmaps() internally. More...
 

Detailed Description

The tests themselves may output logging. When running a test, the test logs use a separate, and simplified, infrastructure from the modules being tested. It is up to the unit test writer to use these APIs consistently. RTITestLogger_log and derived macros are the main logging APIs to be used in tests, but RTITestConnextLogger_log and derived macros can be used instead if Connext logging's features are needed within the test.

See also
RTITestConnextClass.

Function Documentation

◆ RTITestLog_setBitmaps()

void void RTITestLog_setBitmaps ( RTITestLogBitmap  instrumentationMask)

Sets current log verbosity based on the provided bitmap. See RTITestLog_setBitmapsFromVerbosity() as an alternative.

For example, to log error and warning logs:

#define RTI_TEST_LOG_BIT_EXCEPTION
Log all exceptions.
Definition: test_log.h:58
#define RTI_TEST_LOG_BIT_WARN
Log all warnings.
Definition: test_log.h:64
void void RTITestLog_setBitmaps(RTITestLogBitmap instrumentationMask)
Sets current log verbosity based on the provided bitmap. See RTITestLog_setBitmapsFromVerbosity() as ...
Parameters
instrumentationMaskIn. RTITestLogBitmap that defines the desired verbosity level. See Log Bitmap.

◆ RTITestLog_getBitmaps()

void RTITestLog_getBitmaps ( RTITestLogBitmap *  instrumentationMask)

Gets current log verbosity.

Parameters
instrumentationMaskOut. Current log verbosity level. See Log Bitmap.

◆ RTITestLog_setBitmapsFromVerbosity()

void RTITestLog_setBitmapsFromVerbosity ( unsigned int  verbosity)

Sets log verbosity from a number, enabling several bitmaps at the same time. See the RTI_TEST_LOG_VERBOSITY macros in Log Verbosity for mapping to the bitmaps. This is a convenience function that calls RTITestLog_setBitmaps() internally.

Parameters
verbosityIn. Desired verbosity. Increment the verbosity by 1 to enable the next instrumentation bit. See Log Verbosity for possible values.