views:

25

answers:

1

Following up on a debate that I was having with a colleague. What is the community's opinion on whether or not a section of code can be adequate with respect to decision coverage (all possible decisions have evaluated to true and false) but not block coverage, and if a section of code can be adequate with respect to condition coverage (each simple condition in a compound conditions has evaluated to true and false) but not block coverage. Thanks.

A: 

Well... I guess I can't imagine how you could have forced all decisions into both the true and false conditions without having covered every block. The condition coverage doesn't seem like it guarantees decision coverage, though, unless you are saying that every single cell in the truth-table made up by all of the conditions has been hit.

Is this purely academic, or does it support a more practical argument such as "do we have enough test coverage?"