Macros

Code from preprocessor macros is instrumented separately for each macro invocation.

Macros are expanded before Testwell CTC++ instruments the preprocessed code. Coverage for each expansion of a macro is measured with an independent set of counters.

Example

This example shows the macro definition as well as separated coverage for the two macro invocations.

The HTML report shows original source code, not the preprocessed code. Hence for macro invocations the origin of counters might be opaque. You can select Source & Details > Show Coverage Details > Single Probe Descriptions to see all details ctc recorded for the macro code.