Using Annotated Source Colors

Related Topics

PureCoverage uses debug line information to display line-by-line coverage data in the Annotated Source window. By default, PureCoverage annotates the source file with the following colors:

§          Blue, indicating hit lines of code

§          Red, indicating missed lines of code

§          Black, indicating dead lines of code

§          Green, indicating summaries for functions

§          Pink, indicating partially hit multi-block lines of code

With these color-coded annotations, you can quickly browse the annotated source and locate individual untested lines and sections of missed code. To help you easily see missed sections of code, PureCoverage colors the dead code that falls between lines of hit code or lines of missed code the same color as the hit or missed code. You can then use the Next Missed Section and Previous Missed Section shortcut commands to stop where it really matters as you step through your code. For example:

 

images\deadcode.gif

Notes:

§                  If a function is declared as:

 

int function foobar(...)

{

with the open bracket ( { ) on the line following the function, PureCoverage marks the line int function foobar(...)as dead code.

§                  When multiple basic blocks are on one line, PureCoverage collects separate counts for each basic block. However, the Annotated Source window displays only the highest count on the multiple basic block line. For example:

images\multiblk1.gif

 

§                  By default, PureCoverage does not display multi-block lines. To display these lines and see the coverage data, right-click in the Annotated Source window and select Show Multi-block Lines. For example:

images\multiblk2.gif

 

§                  By default, if a line was only partially tested, PureCoverage distinguishes it from hit lines in Visual C++ code and Java code, but not in Visual Basic code.

§                  Annotated source code is available only if debug line information is available, and if the module was monitored at line level.

§                  Annotated source showing line-by-line coverage data is not available when you monitor a Visual Basic 6.0 p-code program.

(C) Copyright IBM Corporation 1993, 2010.