5 ms·
I don’t get the 100% branch coverage requirement. If the code is off of ‘master’ why would you have to go and fix it?
by sghiassy 3y ago
I don’t get the 100% branch coverage requirement. If the code is off of ‘master’ why would you have to go and fix it?
- hinkley 3y agoConditional branches, not repository branches.
- kristiandupont 3y agoI think he's referring to branching in the code (if-then-else blocks).
- anotherhue 3y agoI was confused also but decided they meant if/else branching
- hooksfordays 3y agoBranch coverage means something different. If you have a function with 2 if statements, there are 4 branches. 100% code coverage could be 1 test and would run the code before + after the if statements, and enter each if statement block. 100% branch coverage would test this code 4 times: once without entering either if statement, once only entering the first, once only entering the second, and once entering both.
- bewaretheirs 3y agoBranch coverage refers to branch instructions (in the underlying machine code), not a branch in whatever source control system you're using.