
Practical Matters 253
or which lines of code are executed. Function coverage is useful mainly for
high-level measurements of what parts of your code base are actually being
used. Line coverage is, perhaps, too fine a measurement—if you have n lines
without branching, all lines will be executed.
In my experience at Microsoft, the automated code coverage tools used
block counting where the blocks are determined from the generated assembly
code. One block is a sequence of assembly instructions without branching. Al-
though this makes sense at a high level, there are some low-level consequences
that you must keep in mind. Firstly, the assembly code generated ...