Skip to content
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

No or incorrect coverage on expression body members #1666

Open
anddrzejb opened this issue Jun 14, 2024 · 0 comments
Open

No or incorrect coverage on expression body members #1666

anddrzejb opened this issue Jun 14, 2024 · 0 comments
Labels
untriaged To be investigated

Comments

@anddrzejb
Copy link

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:
image

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).

@github-actions github-actions bot added the untriaged To be investigated label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged To be investigated
Projects
None yet
Development

No branches or pull requests

1 participant