06 October 2015
TN:
SF:/Users/sean/work/tests/xxx
FN:9, Nullable
FN:35, isEmpty
...

this is a tipic lcov.info file, when I opened this file first time, I have no idea what the fu*k is this means, actually it’s really simple with this file we can colorize the source file

TN:<test name> usually empty
SF:<absolute path to the source file>
FN:<line number of function start>,<function name>
FNDA:<execution count>,<function name>
FNF:<number of functions found>
FNH:<number of function hit>
BRDA:<line number>,<block number>,<branch number>,<taken>
BRF:<number of branches found>
BRH:<number of branches hit>
DA:<line number>,<execution count>
LH:<number of lines with a non-zero execution count>
LF:<number of instrumented lines>
end_of_record

note:

BRDA: 10, 1, 0, 0 BRDA: 10, 1, 1, 2

the third column means it’s a if branch or else branch, it only means for binary branch. in this case, there is a branch found on line 10, and if branch is not covered while else branch is covered twice



blog comments powered by Disqus