Skip to content

tests: correct two inaccurate statements in surveyed scenarios - #83

Open
cargo-affected-bot wants to merge 1 commit into
mainfrom
tests/survey-accuracy-fixes
Open

tests: correct two inaccurate statements in surveyed scenarios#83
cargo-affected-bot wants to merge 1 commit into
mainfrom
tests/survey-accuracy-fixes

Conversation

@cargo-affected-bot

Copy link
Copy Markdown
Collaborator

Two accuracy fixes in the functional scenarios today's nightly survey covered. Both are test-file-only; no behavior change.

clean.rs — the post-clean assertion accepted a message that path can't emit. clean_then_status_reports_no_coverage asserted contains("no coverage data yet") || contains("no coverage data found"). The second alternative is the DB-file-absent branch (status.rs:46-50), and the scenario has already asserted three lines earlier that the file still exists — clean clears via SQL DELETE, not unlink. So only the CacheMiss::NoCoverage branch (status.rs:121-125) can fire, which is exactly what the comment above the assertion already says. The || widened the assertion to cover a path the scenario structurally excludes. Dropped it; verified the single-message form still passes.

db_has_function_ranges.rs — module doc called CRATE_ROOT_SENTINEL_END pub. It is pub(crate) (coverage.rs:97), per CLAUDE.md's "Items are pub(crate), never pub". The reason the scenario hard-codes i64::MAX is unchanged and now reads as two independent reasons rather than a wrong one.

No regression test: the first change removes an over-broad assertion (a test of a test), the second is a comment. Verified locally with cargo test --bins (112 passed), cargo test --test functional clean_ and --test functional collect_writes_non_sentinel (both pass), and cargo clippy --all-targets clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant