You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Seems to me there is a problem with covering expression body members. When I try to run coverage for them, there are often false partially covered lines, instead of all lines covered.
To Reproduce
In the repro code there is a static class Mapper that contains 2 methods that are tested:
Mapper.MapConcise - uses expression body members
Mapper.MapVerbose - uses step-by-step approach
Both methods have exactly the same set of tests.
Expected behavior
Both methods should generate 100% code coverage.
Actual behavior
Only Mapper.MapVerbose produces 100%. The Mapper.MapConcise produces a lot of partially not covered lines:
Configuration (please complete the following information):
Please provide more information on your .NET configuration:
* Which coverlet package and version was used? 6.0.2.
* Which version of .NET is the code running on? .net8
* What OS and version, and what distro if applicable? Windows 11 10.0.22631 Build 22631
* What is the architecture (x64, x86, ARM, ARM64)? x64
* Do you know whether it is specific to that configuration? It is not specific to my configuration.
Additional context
I have a very similar code run on azure devops with the same problem. The verbose code goes through without any problem, the concise is breaking my builds (I have 70% code coverage set with evaluation on changes only and it often blocks my CI).
The text was updated successfully, but these errors were encountered:
Describe the bug
Seems to me there is a problem with covering expression body members. When I try to run coverage for them, there are often false partially covered lines, instead of all lines covered.
To Reproduce
In the repro code there is a static class
Mapper
that contains 2 methods that are tested:Mapper.MapConcise
- uses expression body membersMapper.MapVerbose
- uses step-by-step approachBoth methods have exactly the same set of tests.
Expected behavior
Both methods should generate 100% code coverage.
Actual behavior
Only
Mapper.MapVerbose
produces 100%. TheMapper.MapConcise
produces a lot of partially not covered lines:Configuration (please complete the following information):
Please provide more information on your .NET configuration:
* Which coverlet package and version was used? 6.0.2.
* Which version of .NET is the code running on? .net8
* What OS and version, and what distro if applicable? Windows 11 10.0.22631 Build 22631
* What is the architecture (x64, x86, ARM, ARM64)? x64
* Do you know whether it is specific to that configuration? It is not specific to my configuration.
Additional context
I have a very similar code run on azure devops with the same problem. The verbose code goes through without any problem, the concise is breaking my builds (I have 70% code coverage set with evaluation on changes only and it often blocks my CI).
The text was updated successfully, but these errors were encountered: