Closed dupdob closed 9 months ago
Increase granularity for syntax node 'scopes' by adding MemberAccess
and 'Member` on top of expression, statement and block:
if
statement (between normal and mutated block). Typically used for mutations impacting local declaration (eg array initializer)if
statement (between the normal and mutated statement). Used for the empty statement mutator or expression level mutations that cannot be controlled via a conditional operator, such as: pre/post unary operatorsMemberAcess
System.String.Empty
). Mutations cannot be controlled at this level and must be controlled at the enclosing expression level.I added dedicated orchestrators for the following nodes: MemberAccessSyntax
, MemberBindingSyntax
, ConditionalAccessSyntax
and InvocationExpressionSyntax
.
Also revised and simplified some existing orchestrators.
Note that this PR may have marginal impact on mutation test results: it is possible the new design may result in more reliable mutations for some edge case. It is difficult to assess. For sure, most, if not all, users will not see any significant change.
other consideration: as it was a significant refactoring, I reviewed all mutators to see if they would benefit from this change. Also took the opportunity to switch impacted files to filescope namespace, as it appears to be impossible to do it fro the whole project via a dedicated PR
Kudos, SonarCloud Quality Gate passed!
@dupdob thanks for your help :) Now the road is clear toward #1031
thanks @richardwerkman, this means a lot to me. Note that I am working on a document detailing the design, because it is still non trivial and there are still axis of improvements.
Revise and extend mutation orchestration to simplify the implementation of mutators (e.g: LinqMutator, ConditionalMutator...)