Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Commit

Permalink
[Stryker4s] Add Conditional Expression mutator (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wmaarts authored and hugo-vrijswijk committed Feb 19, 2019
1 parent 1d62969 commit cdae27e
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions mutator-types.md
Expand Up @@ -10,17 +10,17 @@ All Stryker versions support a variety of different mutators. The difference in
| [Array Declaration](#array-declaration) |||| | [Array Declaration](#array-declaration) ||||
| [Assignment Expression](#assignment-expression) ||| n/a | | [Assignment Expression](#assignment-expression) ||| n/a |
| [Block Statement](#block-statement) |||| | [Block Statement](#block-statement) ||||
| [Boolean Literal](#boolean-literal) ||| ️✅¹ | | [Boolean Literal](#boolean-literal) ||| ️✅ |
| [Checked Statement](#checked-statement) | n/a || n/a | | [Checked Statement](#checked-statement) | n/a || n/a |
| [Conditional Expression](#conditional-expression) ||| | | [Conditional Expression](#conditional-expression) ||| |
| [Equality Operator](#equality-operator) |||| | [Equality Operator](#equality-operator) ||||
| [Logical Operator](#logical-operator) |||| | [Logical Operator](#logical-operator) ||||
| [Method Expression](#method-expression) |||| | [Method Expression](#method-expression) ||||
| [String Literal](#string-literal) |||| | [String Literal](#string-literal) ||||
| [Unary Operator](#unary-operator) |||| | [Unary Operator](#unary-operator) ||||
| [Update Operator](#update-operator) ||| n/a | | [Update Operator](#update-operator) ||| n/a |


- ¹: Stryker4s does not support `!` boolean substitutions


## Arithmetic Operator ## Arithmetic Operator


Expand Down Expand Up @@ -84,7 +84,9 @@ function saySomething() {
| ----------- | -------- | | ----------- | -------- |
| `true` | `false` | | `true` | `false` |
| `false` | `true` | | `false` | `true` |
| `!(a == b)` | `a == b` | | `!(a == b)` | `a == b` ¹ |

- ¹: Not supported by Stryker4s


[🔝 Back to Top](#supported-mutators) [🔝 Back to Top](#supported-mutators)


Expand All @@ -102,13 +104,15 @@ Stryker.NET *specific mutator*


| Original | Mutated | | Original | Mutated |
| ---------------------------------- | --------------------------------- | | ---------------------------------- | --------------------------------- |
| `for (var i = 0; i < 10; i++) { }` | `for (var i = 0; false; i++) { }` | | `for (var i = 0; i < 10; i++) { }` | `for (var i = 0; false; i++) { }` ¹ |
| `while (a > b) { }` | `while (false) { }` | | `while (a > b) { }` | `while (false) { }` |
| `do { } while (a > b);` | `do { } while (false);` | | `do { } while (a > b);` | `do { } while (false);` |
| `if (a > b) { }` | `if (true) { }` | | `if (a > b) { }` | `if (true) { }` |
| `if (a > b) { }` | `if (false) { }` | | `if (a > b) { }` | `if (false) { }` |
| `var x = a > b ? 1 : 2;` | `var x = true ? 1 : 2;` | | `var x = a > b ? 1 : 2;` | `var x = true ? 1 : 2;` ¹ |
| `var x = a > b ? 1 : 2;` | `var x = false ? 1 : 2;` | | `var x = a > b ? 1 : 2;` | `var x = false ? 1 : 2;` ¹ |

- ¹: Not supported by Stryker4s


[🔝 Back to Top](#supported-mutators) [🔝 Back to Top](#supported-mutators)


Expand Down

0 comments on commit cdae27e

Please sign in to comment.