Open richardwerkman opened 2 months ago
Not sure we should implement the edge increase/decrease mutations, we don't do this for any other mutator either.
We could also add/remove the ^
? Would that make more sense?
I do not think removing the 'relative to end' marker would create more interesting mutation than increment/decrement. On an implementation note, while the mutation seems simple to generate, controlling them will be a bit more difficult: I am not sure we can use a ternary operator with a range expression. but it should be a matter of adding a range expression orchestrator then
Is your feature request related to a problem? Please describe. Range operator expressions are not mutated at the moment. Even though this contains crucial logic sometimes.
..
0
..end
..
..3
..2
..3
..4
start..
..
2..
1..
2..
3..
start..end
..
2..2
1..2
2..2
3..2
2..2
2..1
2..2
2..3
^start..
..
^2..
^1..
^2..
^3..
..^end
..
..^2
..^1
..^2
..^3
start..^end
..
2..^2
1..^2
2..^2
3..^2
2..^2
2..^1
2..^2
2..^3
^start..^end
..
^2..^2
^3..^2
^2..^2
^2..^1
So basically always replace with
..
and if the start or end value is a declared value, increase this by one and decrease by one (check for bounds).Additional context See: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/member-access-operators#range-operator-