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

Fix and simplify async coverage #549

Merged
merged 1 commit into from
Sep 23, 2019

Conversation

MarcoRossignoli
Copy link
Collaborator

closes #113

Today to avoid false positive on async state machines we remove "possible" async unvisited branches.
BTW they're not "real" user code branches, but are generated by async state machine.
With this PR we simplify async/await coverage skipping "compiler generated" branches.

image

cc: @tonerdo @petli @Rjae(check non called async+continuation) and also @SteveGilham because is expert and could argue the idea.

@MarcoRossignoli MarcoRossignoli added tenet-coverage Issue related to possible incorrect coverage bug Something isn't working labels Sep 16, 2019
@ulrichb
Copy link

ulrichb commented Jan 18, 2020

Hmm ... I get now false positive uncovered branches like this:

image

@MarcoRossignoli
Copy link
Collaborator Author

MarcoRossignoli commented Jan 18, 2020

Could be similar to #669?
Or if you can generate a repro and open an issue would be great.

@ulrichb
Copy link

ulrichb commented Jan 18, 2020

@MarcoRossignoli I'm not sure, because I don't use the new C# 8 using ...

Also, (atm.) I see no pattern ... it doesn't happen in every async method ... but even in such simple ones like the following.

image

@MarcoRossignoli
Copy link
Collaborator Author

Ok if you can repro let me know here there is current tested case https://github.com/tonerdo/coverlet/blob/master/test/coverlet.core.tests/Samples/Instrumentation.AsyncAwait.cs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tenet-coverage Issue related to possible incorrect coverage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Branch coverage with async calls
3 participants