This one is used for learning to use GitHub
Stryker4s supports a variety of mutators, which are listed below. Do you have a suggestion for a (new) mutator? Feel free to create an issue!
An always up-to-date reference is also available in the MutantMatcher source.
Original | Mutated |
---|---|
>= |
> , < , == |
> |
<= , < , == |
<= |
< , >= , == |
< |
<= , > , == |
== |
!= |
!= |
== |
Original | Mutated |
---|---|
true |
false |
false |
true |
Original | Mutated |
---|---|
&& |
|| |
|| |
&& |
Original | Mutated |
---|---|
"foo" (non-empty string) |
"" (empty string) |
"" (empty string) |
"Stryker was here!" |
s"foo ${bar}" (string interpolation) |
s"" 1 |
1: Only works with string interpolation and not others (like Scalameta quasiquotes)to avoid compile errors
Original | Mutated |
---|---|
a.filter(b) |
a.filterNot(b) |
a.filterNot(b) |
a.filter(b) |
a.exists(b) |
a.forAll(b) 2 |
a.forAll(b) |
a.exists(b) |
a.isEmpty |
a.nonEmpty |
a.nonEmpty |
a.isEmpty |
a.indexOf |
a.lastIndexOf(b) 2 |
a.lastIndexOf(b) |
a.indexOf(b) |
a.max |
a.min |
a.min |
a.max |
2: This can cause some false positives with unique lists, such as sets