You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes it can be helpful to generally use branch coverage but to
disable it for some lines of code without excluding the line or function
coverage too.
For example if you make heavily use of assertions in your code (which is
generally a good idea) you will see that for each 'assert(...)' exist
one branch which is taken and one that is not. Similarly you can see the
same phenomenon for 'delete' in C++ code.
If you use the 'LCOV_EXCL_LINE' marker in such a situation both of these
branches will be omitted from the output. But in doing so, you loose the
ability to determine if this peace of code is genuine 'dead code' or not
because the line coverage is omitted too.
The newly introduces 'LCOV_EXCL_BR_LINE', 'LCOV_EXCL_BR_START' and
'LCOV_EXCL_BR_STOP' marker address this problem. The usage is similar to
the 'LCOV_EXCL_LINE' etc. markers.
Signed-off-by: Sebastian Stigler <[email protected]>
0 commit comments