Skip to content

docs: align workspace.rs module doc with its four tests - #61

Open
cargo-affected-bot wants to merge 1 commit into
mainfrom
docs/workspace-module-doc-align-tests
Open

docs: align workspace.rs module doc with its four tests#61
cargo-affected-bot wants to merge 1 commit into
mainfrom
docs/workspace-module-doc-align-tests

Conversation

@cargo-affected-bot

Copy link
Copy Markdown
Collaborator

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): editing strings/src/fmt.rs … Strings's tests run; math's lib unit test does not") described a scenario no test exercises — strings/src/fmt.rs is written by write_workspace but 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 edits math/src/lib.rs and asserts both that every math test runs (the within-package structural guarantee) and that strings'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:

  • 1 → workspace_collect_finds_all_tests_across_targets
  • 2 → editing_lib_in_one_member_does_not_pull_in_unrelated_member
  • 3 → editing_integration_test_does_not_pull_in_lib_unit_tests
  • 4 → editing_dep_lib_pulls_in_dependent_tests

No test accompanies this change — it's a comment-only fix to an existing test module's doc.

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>
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