Open
Description
Installed product versions
- Visual Studio: 2022 Professional
- This extension: 1.1.229
Description
If my code contains a try/catch block, the catch is not counted as a branch of the code for branch coverage purposes. This can lead to a bizarre scenario where I have 100% branch coverage but the catch block is not covered. I think catch blocks should count as branches for this reason.
Steps to recreate
- Write some code with a try/catch block
- Write a test for that code that covers all the code except the catch block
Current behavior
Branch coverage reported as 100%
Expected behavior
Branch coverage should be reported as less than 100%, because the catch block was not tested.
Metadata
Metadata
Assignees
Labels
No labels