-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up rustdoc tests by moving them into one place #76223
Clean up rustdoc tests by moving them into one place #76223
Conversation
mod html_toc; | ||
#[cfg(test)] | ||
mod passes_unindent_comments; | ||
#[cfg(test)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just cfg(test) the parent module instead of duplicating the cfgs?
The whole point of Rust unit tests is that they can be placed in modules which they are testing, preventing things that don't need to be public from being public. |
☔ The latest upstream changes (presumably #73819) made this pull request unmergeable. Please resolve the merge conflicts. |
I agree with petrochenkov here ... this makes a lot of functions public just for testing.
Can you expand on this? What fixtures does rustdoc use for unit tests? |
Also, you linked to the wrong issue in the PR description, I think you meant #76036. |
I'm going to close this since it's not clear it's a useful change. |
Fixes #76035
The idea behind this move is to have tests in one place. It became very important for me because we started to have fixtures, making the code "more messy" than it should in my opinion. Like this, all tests are in one place and they're not mixed with the code anymore.
r? @jyn514
I think it'll also interest @ollie27 so pinging them!