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

Do not mutate * to / and vice versa if one of the operands is numeric ±1.0 #673

Merged
merged 1 commit into from Mar 23, 2019

Conversation

maks-rafalko
Copy link
Member

@maks-rafalko maks-rafalko commented Mar 22, 2019

Do not mutation * to / and vice versa if one of the operands is 1 or -1 or 1.0 or -1.0 to avoid equivalent mutations.

Fixes the issue mentioned by Badoo in their talk about Mutation Testing:

- $a = $b * 1;
+ $a = $b / 1;

^ this is an equivalent mutant that can not be killed.

…1 or 1.0 or -1.0 to avoid equivalent mutation
@maks-rafalko maks-rafalko changed the title Do not mutation * to / and vice versa if one of the operands is numeric ±1.0 Do not mutate * to / and vice versa if one of the operands is numeric ±1.0 Mar 22, 2019
sanmai
sanmai approved these changes Mar 23, 2019
@maks-rafalko
Copy link
Member Author

maks-rafalko commented Mar 23, 2019

Thank you @sanmai

@maks-rafalko maks-rafalko merged commit fc4a96f into master Mar 23, 2019
4 of 5 checks passed
@ghost ghost removed the Needs Review label Mar 23, 2019
@maks-rafalko maks-rafalko deleted the remove-equivalent-mutations branch Mar 23, 2019
@maks-rafalko maks-rafalko added this to the 0.13.0 milestone Mar 23, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants