With branch coverage being introduced there is a curious case of 100% code coverage possible without 100% branch coverage.
Whenever the following code is encountered:
it's possible to achieve 100% coverage in the unit test by setting a to True, while never testing the behaviors when a is False. This needs to be rectified, possibly by adding a property specifying a separate branch coverage threshold and enforcing it separately from and in addition to line coverage.
With branch coverage being introduced there is a curious case of 100% code coverage possible without 100% branch coverage.
Whenever the following code is encountered:
it's possible to achieve 100% coverage in the unit test by setting
atoTrue, while never testing the behaviors whenaisFalse. This needs to be rectified, possibly by adding a property specifying a separate branch coverage threshold and enforcing it separately from and in addition to line coverage.