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

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
@maks-rafalko
Copy link
Member Author

Thank you @sanmai

@maks-rafalko maks-rafalko merged commit fc4a96f into master Mar 23, 2019
@ghost ghost removed the Needs Review label Mar 23, 2019
@maks-rafalko maks-rafalko deleted the remove-equivalent-mutations branch March 23, 2019 05:24
@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