New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complex branches are reported incorrectly #79
Comments
Actually, it seems that
or in F# match expressions like
|
Branch enhancements are in #73. It uses the same logic OpenCover uses for determining branches, so it will still only report 5 vs the 7, but 5 > 1. It also fixes the switches not showing as branches. |
OpenCover does report 5 branches in this case, but they're the wrong 5. The decompiled code looks like
and it detects cases 0, 1 and out-of-band as distinct routes to the |
@SteveGilham this issue is very old, is this issue still present? Can you give it a try with last version? |
Between changes in the compiler and the tooling, this issue no longer reproduces. The example code was like this Now the decompiled code looks almost the same (default shown last in the decompilation)
and 8 branches are shown
2 per if, 3 switch cases and path 0 being the unobtainable "do not jump" case |
Thx for testing. |
This is the same code as for OpenCover issue 819
The only branch point reported for this line is
when there are five visible (seven in the underlying IL) ways of proceeding
I note in passing that the offset values here are not the IL offset values of the branch and its terminus as generated by opencover.
The text was updated successfully, but these errors were encountered: