[dead]
int returns_less_than_twelve(int input1, int input2) {
int sum = 0;
if (input >= 5) {
sum += 5;
}
if (input2 >= 5) {
sum += 8;
}
return sum;
}
The following test cases will pass and achieve 100% branch coverage. int x = returns_less_than_twelve(5,0);
test_assert(x < 12);
int y = returns_less_than_twelve(0,5);
test_assert(x < 12);
However, this does not cover the entire input space so returns_less_than_twelve(5,5);
test_assert(x < 12);
Will fail. However, branch coverage won't tell you that there's a hole in your test coverage.