-
Notifications
You must be signed in to change notification settings - Fork 21
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
Naming scheme + Adjusted mutation score used by mutation levels #2995
base: master
Are you sure you want to change the base?
Conversation
… because of the mutation level
# Conflicts: # docs/supported-mutators.md
Docs/mutant operator names
| ------------------------------------------ | -------------------------------------- | --------------------- | | ||
| FilledStringLiteralToEmptyReplacement | `"foo"` (filled string) | `""` (empty string) | | ||
| EmptyStringLiteralToFilledReplacement | `""` (empty string) | `"Stryker was here!"` | | ||
| FilledInterpolatedStringToEmptyReplacement | `s"foo ${bar}"` (string interpolation) | `s""` ¹ | |
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.
Minor thing, but as far as I'm concerned, this can also be FilledStringLiteralToEmptyReplacement
. I don't think Stryker-JS, for example, has a difference between ""
and ``
BundleMon (elements)Files updated (3)
Total files change +523B +0.08% Final result: ✅ View report in BundleMon website ➡️ |
| SubtractionAssignmentNegation | `-=` | `+=` | | ||
| MultiplicationAssignmentNegation | `*=` | `/=` | | ||
| DivisionAssignmentNegation | `/=` | `*=` | | ||
| RemainderAssignmentToMultiplicationReplacement | `%=` | `*=` | |
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.
| RemainderAssignmentToMultiplicationReplacement | `%=` | `*=` | | |
| RemainderAssignmentToMultiplicationAssignmentReplacement | `%=` | `*=` | |
| RemainderAssignmentToMultiplicationReplacement | `%=` | `*=` | | ||
| LeftShiftAssignmentNegation | `<<=` | `>>=` | | ||
| RightShiftAssignmentNegation | `>>=` | `<<=` | | ||
| BitwiseAndAssignmentToBitwiseOrReplacement | `&=` | <code>|=</code> | |
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.
| BitwiseAndAssignmentToBitwiseOrReplacement | `&=` | <code>|=</code> | | |
| BitwiseAndAssignmentToBitwiseOrAssignmentReplacement | `&=` | <code>|=</code> | |
| LeftShiftAssignmentNegation | `<<=` | `>>=` | | ||
| RightShiftAssignmentNegation | `>>=` | `<<=` | | ||
| BitwiseAndAssignmentToBitwiseOrReplacement | `&=` | <code>|=</code> | | ||
| BitwiseOrAssignmentToBitwiseAndReplacement | <code>|=</code> | `&=` | |
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.
| BitwiseOrAssignmentToBitwiseAndReplacement | <code>|=</code> | `&=` | | |
| BitwiseOrAssignmentToBitwiseAndAssignmentReplacement | <code>|=</code> | `&=` | |
| RightShiftAssignmentNegation | `>>=` | `<<=` | | ||
| BitwiseAndAssignmentToBitwiseOrReplacement | `&=` | <code>|=</code> | | ||
| BitwiseOrAssignmentToBitwiseAndReplacement | <code>|=</code> | `&=` | | ||
| NullishCoalescingOperatorToLogicalAndAssignmentReplacement | `??=` | `&&=`¹ | |
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.
| NullishCoalescingOperatorToLogicalAndAssignmentReplacement | `??=` | `&&=`¹ | | |
| NullishCoalescingAssignmentToLogicalAndAssignmentReplacement | `??=` | `&&=`¹ | |
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.
@rouke-broersma would you agree on this name? Or should it be NullCoalescingAssingmentToLogicalAndAssignmentReplacement
?
| Mutant operator | Original | Mutated | | ||
| -------------------------------------- | ---------------------------------------------------------- | ------------------------------------------- | | ||
| ForLoopConditionToFalseReplacement | `for (var i = 0; i < 10; i++) { }` | `for (var i = 0; false; i++) { }` ¹ | | ||
| WhileLoopConditionToFalseReplacement | `while (a > b) { }` | `while (false) { }` | | ||
| DoWhileLoopConditionToFalseReplacement | `do { } while (a > b);` | `do { } while (false);` | | ||
| IfConditionToTrueReplacement | `if (a > b) { }` | `if (true) { }` | | ||
| IfConditionToFalseReplacement | `if (a > b) { }` | `if (false) { }` | | ||
| BooleanExpressionToTrueReplacement | `var x = a > b ? 1 : 2;` | `var x = true ? 1 : 2;` ¹ | | ||
| BooleanExpressionToFalseReplacement | `var x = a > b ? 1 : 2;` | `var x = false ? 1 : 2;` ¹ | | ||
| SwitchStatementBodyRemoval | `switch(x) { case 1: doSomething(); default: default(); }` | `switch(x) { case 1: default: default(); }` | |
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.
I think we should remove this group, as mutants in this group should be merged in others.
Old name | New name |
---|---|
ForLoopConditionToFalseReplacement | LessThanExpressionToFalseReplacement |
WhileLoopConditionToFalseReplacement | same |
DoWhileLoopConditionToFalseReplacement | GreaterThanExpressionToFalseReplacement |
IfConditionToTrueReplacement | GreaterThanExpressionToTrueReplacement |
IfConditionToFalseReplacement | Sane |
BooleanExpressionToTrueReplacement | Same |
BooleanExpressionToFalseReplacement | Same |
SwitchStatementBodyRemoval | BlockStatementRemoval |
Contains:
The status
IGNORED_BY_LEVEL_STATUS
is introduced in the mutation levels PR from StrykerJS, so that one needs to be merged first for this functionality to be enabled.