Stryker supports a variety of mutators, which are listed below. Do you have a suggestion for a (new) mutator? Feel free to create an issue!
- Arithmetic Operators
- Equality Operators
- Boolean Literals
- Assignment statements
- Unary Operators
- Update Operators
- Checked Statements
- Linq Methods
- String Literals
Original | Mutated |
---|---|
+ |
- |
- |
+ |
* |
/ |
/ |
* |
% |
* |
Original | Mutated |
---|---|
> |
< |
> |
>= |
>= |
< |
>= |
> |
< |
> |
< |
<= |
<= |
> |
<= |
< |
== |
!= |
!= |
== |
Original | Mutated |
---|---|
&& |
|| |
|| |
&& |
Original | Mutated |
---|---|
true |
false |
false |
true |
! |
|
Original | Mutated |
---|---|
+= |
-= |
-= |
+= |
*= |
/= |
/= |
*= |
%= |
*= |
<<= |
>>= |
>>= |
<<= |
&= |
|= |
|= |
&= |
Original | Mutated |
---|---|
-variable |
+variable |
+variable |
-variable |
~variable |
variable |
Original | Mutated |
---|---|
variable++ |
variable-- |
variable-- |
variable++ |
++variable |
--variable |
--variable |
++variable |
Original | Mutated |
---|---|
checked(2 + 4) |
2 + 4 |
Original | Mutated |
---|---|
Distinct() |
|
Reverse() |
|
OrderBy() |
|
OrderByDescending() |
|
SingleOrDefault() |
FirstOrDefault() |
FirstOrDefault() |
SingleOrDefault() |
First() |
Last() |
Last() |
First() |
All() |
Any() |
Any() |
All() |
Skip() |
Take() |
Take() |
Skip() |
SkipWhile() |
TakeWhile() |
TakeWhile() |
SkipWhile() |
Min() |
Max() |
Max() |
Min() |
Sum() |
Count() |
Count() |
Sum() |
Original | Mutated |
---|---|
"foo" |
"" |
"" |
"Stryker was here!" |
$"foo {bar}" |
$"" |
@"foo" |
@"" |