-
Notifications
You must be signed in to change notification settings - Fork 175
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
feat(Mutators): Add conditional operator mutator #2583
base: master
Are you sure you want to change the base?
feat(Mutators): Add conditional operator mutator #2583
Conversation
Add conditional operator mutator Add tests for conditional operator mutator Include conditional operator mutator in mutations.md
sorry to break this to you, but Stryker does mutate the condition part of conditional expressions. May I suggest you clarify why the existing mutation is not sufficient and/or why it is not working on your code? |
@michalusio : could you adjust end to end (called integration here) tests' expected results, so that the build can pass ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please answer how previously difficult cases are supported by the new mutator ?
@@ -61,19 +60,5 @@ public void MutatesStatementWithMethodCallWithNoArguments(string method) | |||
mutation.ReplacementNode.ToString().ShouldBe("!(Method())"); | |||
mutation.DisplayName.ShouldBe("Negate expression"); | |||
} | |||
|
|||
[Theory] | |||
[InlineData("var y = x is object result ? result.ToString() : null;")] // can't mutate inline var declaration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you checked how this expression is mutated, and most importantly, does it compile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As reviewed by @dupdob some changes and explanations are requested
Add conditional operator mutator
Add tests for conditional operator mutator
Include conditional operator mutator in mutations.md
For now the mutator has MutationLevel == Complete, as the docs said that the level will be decided by the team.
Closes #2581.