test(baseline): close 9 mutation-test gaps (#35)#63
Merged
Conversation
Adds 7 targeted tests covering the surviving mutants reported by `cargo mutants --file src/baseline.rs` in the round-1 audit: - typosquat_key_requires_both_purl_and_closest_nonempty catches the && -> || mutant in from_value_inner (line 151) - maintainer_age_key_requires_both_purl_and_contributor_nonempty catches three mutants on line 176: && -> ||, delete ! on purl, delete ! on contrib - apply_drops_matched_maintainer_age_and_keeps_unmatched catches delete ! on line 320 (retain predicate) - add_suppression_full_writes_object_form_with_expires_only catches || -> && on line 414 (object-form gating) plus delete ! on line 429 (parent-dir creation, exercised via nested path) - add_suppression_full_writes_object_form_with_reason_only symmetric coverage of the other side of the || at line 414 - add_suppression_full_error_names_actual_root_type catches the doc_kind stub-string mutants on line 523 via the public error path that calls it - doc_kind_maps_each_json_variant_to_its_label direct unit pinning every JSON variant -> label mapping Each test docstring names the line:col of the mutant it catches, so a future mutants run that revives any of these can be traced back to the test that should have caught it.
Coverage reportLine coverage: 84.5% (9845 / 11644 lines) Full lcov report available as workflow artifact coverage-lcov: download from this run. v0.9.8 introduces this report; |
Owner
Author
|
Mutants recheck on 0 surviving (down from 9 in round 1). All 9 logic survivors closed by the 7 new tests in this PR. Ready when you are. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes 9 of the 9 surviving mutants on `src/baseline.rs` found in the issue #35 round-1 mutation audit. Pure test additions; no source changes.
Mutants closed
From `cargo mutants --in-place --no-shuffle --file src/baseline.rs --timeout 60` (round-1 baseline: 54 mutants tested in 24m, 9 missed, 42 caught, 3 unviable):
Verification
Notes
Part of #35.