Data Structures, Algorithms, & Applications in C++
Chapter 1, Exercise 31
The program has 4 execution paths and each execution path has at least one
statement that is not on any other execution path.
Therefore, any test set that provides statement coverage must follow all
execution paths, and hence must provide
execution path coverage coverage.
The program has 3 decisions. By examining the decisions needed to execute
each of the 4 execution paths, we see that over these 4 execution
paths, each of the 3 decisions takes on the truth values true and false.
Hence execution path coverage implies decision coverage.
Since we have already shown that statement coverage implies execution
path coverage, it follows that any test set that provides statement
coverage must also provide decision coverage.