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 mutation for if-statement with instanceof pattern match #1341

Closed
Stephan202 opened this issue Aug 11, 2024 · 1 comment
Closed

No mutation for if-statement with instanceof pattern match #1341

Stephan202 opened this issue Aug 11, 2024 · 1 comment

Comments

@Stephan202
Copy link

In the context of PicnicSupermarket/error-prone-support#1283 I noticed that JaCoCo flagged that this if-statement wasn't covered by tests. Despite that, Pitest reported that all mutants were killed. Afterwards I added another commit to introduce proper coverage.

Sorry for reporting this without a minimal reproduction case; if desired I can find some time for that later. For now just a hunch: could it be that Pitest skips this case due to the instanceof pattern matching?

@Stephan202
Copy link
Author

Alright, running a full Pitest analysis does cause an unkilled mutant to be reported. So there's no issue here: Pitest's PR analysis mode was smart enough to see that this branch was unchanged, even though other code in that same method was modified. Sorry for reporting a non-bug!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant