docs: align workspace.rs module doc with its four tests - #61
Open
cargo-affected-bot wants to merge 1 commit into
Open
docs: align workspace.rs module doc with its four tests#61cargo-affected-bot wants to merge 1 commit into
cargo-affected-bot wants to merge 1 commit into
Conversation
The module doc listed five scenarios, but the file has four tests. Scenario #2 described editing strings/src/fmt.rs — a file no test edits. The actual cross-member-narrowing check is folded into editing_lib_in_one_member_does_not_pull_in_unrelated_member (which edits math/src/lib.rs). Merge #2 into the math/src/lib.rs item and renumber so the list maps 1:1 onto the tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Found during the nightly rolling survey of
tests/functional/workspace.rs.The module-level doc comment listed five numbered scenarios, but the file only has four
#[test]functions. Scenario #2 ("Cross-member narrowing (no dep): editingstrings/src/fmt.rs… Strings's tests run; math's lib unit test does not") described a scenario no test exercises —strings/src/fmt.rsis written bywrite_workspacebut never edited by any test.The actual cross-member-narrowing check lives in
editing_lib_in_one_member_does_not_pull_in_unrelated_member, which editsmath/src/lib.rsand asserts both that everymathtest runs (the within-package structural guarantee) and thatstrings's tests stay out. The old doc list split that one test across items #2 and #4 and pointed #2 at a file/direction the test doesn't touch.This folds the two into a single accurate item and renumbers, so the four-item list maps 1:1 onto the four tests:
workspace_collect_finds_all_tests_across_targetsediting_lib_in_one_member_does_not_pull_in_unrelated_memberediting_integration_test_does_not_pull_in_lib_unit_testsediting_dep_lib_pulls_in_dependent_testsNo test accompanies this change — it's a comment-only fix to an existing test module's doc.