stryker-mutator / stryker-net

Mutation testing for .NET core and .NET framework!
https://stryker-mutator.io
Apache License 2.0
1.74k stars 177 forks source link

Mutator to remove operand in binary expressions #2950

Open Liam-Rougoor opened 3 weeks ago

Liam-Rougoor commented 3 weeks ago

Is your feature request related to a problem? Please describe. Currently, we have a BinaryExpressionMutator that swaps operators, for example a + b -> a - b or a && b -> a || b. For NullCoalescingExpressions, we do not only swap, but also remove either side of the expression.

I think this is something we could also do for other binary expressions.

Describe the solution you'd like I'd like a mutator that removes either operand in a binary expression. For example, a + b -> a, a + b -> b, a && b -> a, etc.