Branch coverage is a tiny fraction of total program state coverage.
Then there’s branchless boundary conditions e.g. your software might fuck up on overflow, but there’s no branching, at least not in your code. Just things which get incoherent in ways you had not anticipated.
Think about it for a second. Imagine you have
function(bool foo, bool bar) {
if(foo) {
//Something
} else {
//Something else
}
if(bar) {
//Something
} else {
//Something else
}
}If you add two unit tests that test foo(true,true) and foo(false, false) you get 100% line and branch coverage, but only hit 50% path coverage.