| 1 |
# Mutants that NO test can kill, with the reason each one is unreachable by any |
| 2 |
# test that could be written. |
| 3 |
# |
| 4 |
# THE BAR IS IMPOSSIBILITY, NOT COST. A mutant that a test could kill, where |
| 5 |
# nobody has written that test, does not belong here however unappealing the |
| 6 |
# test looks. It stays a visible survivor with a GoingsOn task against it. The |
| 7 |
# two classes are easy to conflate and the difference is the whole value of the |
| 8 |
# number: an exclusion list that also absorbs "not worth it" reports zero while |
| 9 |
# real coverage gaps sit underneath it. |
| 10 |
# |
| 11 |
# The evidence for that bar is in the sibling files. Of docengine's nine |
| 12 |
# survivors, four were coverage gaps; of custom-pages' six, five looked |
| 13 |
# equivalent at a glance and were not. So: try to kill it first, and add an |
| 14 |
# entry only with the reason written out. |
| 15 |
# |
| 16 |
# The patterns are regexes matched against the WHOLE listing line, `file:line:col` |
| 17 |
# included, so `+`, `*` and `|` need escaping. A bare `||` is an empty |
| 18 |
# alternation and silently excludes every mutant in the crate. |
| 19 |
# |
| 20 |
# An entry carries a line number when the description alone would also match a |
| 21 |
# mutant that is being CAUGHT -- cargo-mutants names a mutant by its operator and |
| 22 |
# its enclosing function and nothing else, so one function with two similar |
| 23 |
# operators needs the position to tell them apart. A stale anchor stops matching |
| 24 |
# and the mutant returns as a visible survivor, which is the safe direction. |
| 25 |
# Re-derive by diffing `cargo mutants --list` with and without this file. |
| 26 |
|
| 27 |
exclude_re = [ |
| 28 |
# The two oracle wrappers in `mod oracle`. An oracle asserts what must hold |
| 29 |
# independently of the code under test, so it only speaks when that code is |
| 30 |
# wrong; replacing its body with `()` is invisible to every test that passes. |
| 31 |
# Killing it would mean shipping a broken planner for a test to catch, which |
| 32 |
# is not a test that can exist alongside a correct one. |
| 33 |
# |
| 34 |
# The evidence these two work is the other half of the same run rather than |
| 35 |
# a mutant: all 34 mutants in `MultipartPlan::{new,auto,part_len,part_range}` |
| 36 |
# were caught, and they were caught AT THESE ASSERTIONS. |
| 37 |
"replace oracle::check_plan with \\(\\)", |
| 38 |
"replace oracle::check_auto with \\(\\)", |
| 39 |
|
| 40 |
# `while bytes_read < part_size` -> `<=` in the part-filling loop. At |
| 41 |
# equality the extra iteration reads into `&mut buf[part_size..]`, an empty |
| 42 |
# slice, and a read into an empty buffer returns `Ok(0)` without touching |
| 43 |
# the file -- which is the loop's own break arm. One wasted call to `read` |
| 44 |
# and an identical buffer, so no observation distinguishes it. |
| 45 |
"src/lib.rs:1072:30: replace < with <= in S3Client::run_multipart_upload", |
| 46 |
] |
| 47 |
|