Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
111 lines (99 sloc) 3.04 KB

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

Original Mutated
+ -
- +
* /
/ *
% *

Equality Operators

Original Mutated
> <
> >=
>= <
>= >
< >
< <=
<= >
<= <
== !=
!= ==

Logical Operators

Original Mutated
&& ||
|| &&

Boolean Literals

Original Mutated
true false
false true
!person.IsAdult() person.IsAdult()
if(person.IsAdult()) if(!person.IsAdult())
while(person.IsAdult()) while(!person.IsAdult())

Assignment Statements

Original Mutated
+= -=
-= +=
*= /=
/= *=
%= *=
<<= >>=
>>= <<=
&= |=
|= &=

Unary Operators

Original Mutated
-variable +variable
+variable -variable
~variable variable

Update Operators

Original Mutated
variable++ variable--
variable-- variable++
++variable --variable
--variable ++variable

Checked Statements

Original Mutated
checked(2 + 4) 2 + 4

Linq Methods

Original Mutated
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()

String Literals

Original Mutated
"foo" ""
"" "Stryker was here!"
$"foo {bar}" $""
@"foo" @""
You can’t perform that action at this time.