Commit 3854494
authored
Fix unchanged string mutants (#437)
* Add test for github issue 435
* Filter out identical string mutants with different values
As at the status quo, operator_string took the prefix of the node's
value, trimming that off the rest to leave an approximation.
This worked well enough until some wombat (hi) fed in a regex
string consisting only of escape sequences and whitespace. For
whatever reason, the node represented that value as r'(rest of text...)
which the status quo dutifully trimmed to (rest of text...).
As the two text strings didn't match, status quo dutifully let the
mutant through despite it being a no-op.
This commit adds an additional check to catch the _unmodified_ node
value being equal to the mutated node value, skipping those
candidate mutants.1 parent 9f672be commit 3854494
2 files changed
+27
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| 56 | + | |
| 57 | + | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
421 | 445 | | |
422 | 446 | | |
423 | 447 | | |
| |||
0 commit comments