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
![image](https://private-user-images.githubusercontent.com/6518006/339900771-c85fac07-d243-40a8-8310-07980165ae9a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyNzQ5NzksIm5iZiI6MTcyNDI3NDY3OSwicGF0aCI6Ii82NTE4MDA2LzMzOTkwMDc3MS1jODVmYWMwNy1kMjQzLTQwYTgtODMxMC0wNzk4MDE2NWFlOWEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjFUMjExMTE5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDgyYjI4OWJkYTEyMmU0NzJhYmUzMzljZDk4NDJmYjEzNGY5OTE4MzM5Yzg2YjRkMzg1YWY2MmNmMzFmNTY2MiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.EcJ7U24F6RPCs4QMZBAFySFf0RIF1X2iGq2_BUxECtE)
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: