-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustdoc: Add more test coverage #91113
Comments
cc @rust-lang/rustdoc |
@rustbot claim |
@cameron1024 Since this is a tracking issue, I don't think it makes sense to claim - I plan to add some examples of tests soon, and it's definitely possible for multiple people to work on it in parallel :) feel free to work on it in the meantime though! |
…uillaumeGomez rustdoc: add more test coverage rust-lang#91113
…=GuillaumeGomez rustdoc: Add more test coverage Related issue rust-lang#91113
…=GuillaumeGomez rustdoc: Add more test coverage Related issue rust-lang#91113
@rustbot claim |
I think the description should be updated. Tests are in |
I was thinking on this issue and just wonder if there is any coverage tool we can use to see the blind points; it might be helpful for this case. |
Summary
Currently, rustdoc doesn't have much test coverage, but it does have a lot of edge cases. We would like to have more test coverage, so we can improve the code with less risk of introducing bugs.
It's even helpful to add tests for incorrect behavior since it will help us find, fix, and test the fixes for bugs.
What to test
pub use self::foo::bar
) and inlining (some re-exports are rendered as re-exports, while others have their docs copied as if the re-export is the definition)impl<T> MyTrait for &T
), and auto impls (likeSized
,Send
, andSync
)(i)
next to return types); it has some bugs currently that would be good to fix.How to test
Here is the documentation for rustdoc's main tests (the tests in
src/test/rustdoc
):rust/src/etc/htmldocck.py
Lines 28 to 100 in 49d4232
You may also want to look at some existing tests in
src/test/rustdoc
.Please note that you do not need to check that rustdoc's behavior is correct. We will check during code review, and as mentioned earlier, tests for incorrect behavior can be helpful too.
If you have any questions or get stuck, please ask here or on Zulip in
#rustdoc
!The text was updated successfully, but these errors were encountered: