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
Add mutator to remove shared cases #1306
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this new Mutator! Looks good to me except minor comments above.
Question: why do we remove only shared cases? Why not to remove case by case?
@maks-rafalko I only removed shared cases because there is no way to see they are missing tests by looking at the code-coverage. case 'a':
break; I'm unsure about this. If you want this to remove all What do you think? Regarding the suggested changes: I'll probably look into it over the weekend. |
I'm ok with removing only shared cases :) Thanks, looking forward to getting it merged! |
09e1619
to
27930b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Khartir!
This PR:
case
s fromswitch
-statments that share a bodyCloses #1290
Code like this:
Creates the following mutants:
switch ($value) { case 'a': doSomething(); break; - case 'b': case 'c': default: doSomethingElse(); break; }
switch ($value) { case 'a': doSomething(); break; case 'b': - case 'c': default: doSomethingElse(); break; }
switch ($value) { case 'a': doSomething(); break; case 'b': case 'c': - default: doSomethingElse(); break; }