The table-test helper's module docs teach the form almost nobody uses. Across the tree, 710 of 734 scenarios! / value_scenarios! calls use the run = |closure| form; only 24 use the fn_path: form the header examples lead with. And the closing "What's shared, and what stays a convention" paragraph prescribes a local struct Case plus assert_outcome pattern that has zero uses anywhere -- the pattern people actually reach for on multi-input rows is a local named struct passed as the macro's input and destructured in the run = closure. STYLE_GUIDE.md already documents the right approach; only the crate's own module docs drifted.
This updates the carbide-test-support module docs to lead with the run = |row| ... form and to describe the real multi-input idiom, and trims the assert_outcome guidance down to what it is -- an escape hatch for a hand-written case body, not the common path. No code or call-site changes.
Scope
crates/test-support/src/lib.rs -- module-level doc comment: the header examples (currently lead with the fn_path: form) and the closing "What's shared, and what stays a convention" paragraph (roughly lines 18-180).
- Add one
run = |closure| example to the doctests so the dominant form is exercised.
Acceptance
- The primary documented example uses the
run = form.
- The multi-input guidance describes the local-named-struct-as-
input pattern; the assert_outcome mention is scoped to hand-written bodies.
cargo test --doc -p carbide-test-support passes. No non-doc changes.
Size: S
Part of #2692.
The table-test helper's module docs teach the form almost nobody uses. Across the tree, 710 of 734
scenarios!/value_scenarios!calls use therun = |closure|form; only 24 use thefn_path:form the header examples lead with. And the closing "What's shared, and what stays a convention" paragraph prescribes a localstruct Caseplusassert_outcomepattern that has zero uses anywhere -- the pattern people actually reach for on multi-input rows is a local named struct passed as the macro'sinputand destructured in therun =closure.STYLE_GUIDE.mdalready documents the right approach; only the crate's own module docs drifted.This updates the
carbide-test-supportmodule docs to lead with therun = |row| ...form and to describe the real multi-input idiom, and trims theassert_outcomeguidance down to what it is -- an escape hatch for a hand-written case body, not the common path. No code or call-site changes.Scope
crates/test-support/src/lib.rs-- module-level doc comment: the header examples (currently lead with thefn_path:form) and the closing "What's shared, and what stays a convention" paragraph (roughly lines 18-180).run = |closure|example to the doctests so the dominant form is exercised.Acceptance
run =form.inputpattern; theassert_outcomemention is scoped to hand-written bodies.cargo test --doc -p carbide-test-supportpasses. No non-doc changes.Size: S
Part of #2692.