Decision Coverage

Decision coverage includes function coverage and measures additionally if decisions are evaluated to true and to false.

Relevant decisions occur in if, for, while, do-while and conditional ternary statements, in case blocks of a switch statement, in C++ try statements and in their catch blocks. Furthermore, unconditional control transfers like goto, return, throw, break, continue are counted.

The source file in the following example has decision coverage 5 / 6.