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