mutation-testing-elements icon indicating copy to clipboard operation
mutation-testing-elements copied to clipboard

Merge ConditionalExpression with EqualityOperator and move mutation from BooleanLiteral to LogicalOperator

Open jpgsmits opened this issue 4 years ago • 0 comments

The ConditionalExpression mutator operates on the same operators as the EqualityOperator (a < b, a > b, etc.), except in the context of for/while-loops and if-statements, and it always mutates to true and false (without causing infinite loops). That's why I propose that the ConditionalExpression mutator is merged with the EqualityOperator, by adding generic mutations such as a < b to false and true to the EqualityOperator. It also makes sense to me to do these mutations outside of the context of the ConditionalExpression, for example in bool x = a < b; to bool x = false;.

Also, currently there is the !(a == b) to a == b mutation under BooleanLiteral, which has nothing to do with boolean literals. I think instead it should be placed under the LogicalOperator mutator.

jpgsmits avatar Oct 18 '21 09:10 jpgsmits