coverlet-coverage / coverlet

Cross platform code coverage for .NET
MIT License
2.99k stars 386 forks source link

All branches in fixed statement not covered. #1016

Open QuantifEye opened 3 years ago

QuantifEye commented 3 years ago

I am not sure if this is a bug, or if I am misunderstanding how fixed works.

Here is an example of Report and xml.

image

<method name="Fill" signature="(System.UInt32[])" line-rate="1" branch-rate="0.6" complexity="10">
<lines>
<line number="159" hits="4" branch="False"/>
<line number="160" hits="4" branch="False"/>
<line number="161" hits="4" branch="True" condition-coverage="100% (2/2)">
<conditions>
<condition number="11" type="jump" coverage="100%"/>
</conditions>
</line>
<line number="162" hits="1" branch="False"/>
<line number="163" hits="1" branch="False"/>
<line number="167" hits="3" branch="False"/>
<line number="168" hits="3" branch="True" condition-coverage="50% (2/4)">
<conditions>
<condition number="25" type="jump" coverage="50%"/>
<condition number="30" type="jump" coverage="50%"/>
</conditions>
</line>
<line number="169" hits="3" branch="True" condition-coverage="50% (2/4)">
<conditions>
<condition number="50" type="jump" coverage="50%"/>
<condition number="56" type="jump" coverage="50%"/>
</conditions>
</line>
<line number="170" hits="3" branch="False"/>
<line number="171" hits="3" branch="False"/>
<line number="172" hits="3" branch="False"/>
<line number="173" hits="3" branch="False"/>
<line number="174" hits="4" branch="False"/>
</lines>
</method>
Bertk commented 9 months ago

fixed statement - pin a variable for pointer operations