-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Testing tutorial #11052
Testing tutorial #11052
Conversation
This should be discussed before merging. Adding a whole new tutorial is a pretty heavy-handed thing to do and it's quite short right now (no mention of benchmarking, options to the tests executable, filtering, running tests serially, etc.) It seems like we do indeed need a tutorial which explains our unit test infrastructure, but it may need to be more thorough and require more thought than as-is right now. |
Added the contents of https://github.com/mozilla/rust/wiki/Doc-unit-testing, per @cmr's suggestion |
Wrap the lines to 100 chars and it's golden. @alexcrichton do you think it's better now? |
I'm still wary of just copy/pasting what's on the wiki. This needs to be thought out and at least consider a reorganization. The content at the beginning doesn't seem to flow well with the rest, and I'm not sure that the content from the wiki is the "shining example" of how testing should be done. |
Is the content from the wiki wrong? |
There does seem to be a general consensus about moving docs out of the wiki and testing is a good topic. |
@jvns Could you squash your commits into one? |
Squashed! |
r? @brson |
There's no explanation anywhere right now of how to do testing with Rust, so here's a basic explanation of how to write and run a test.
New lint [`string_lit_chars_any`] Closes rust-lang#10389 This lint can probably be deprecated if/when rustc optimizes `.chars().any(...)`. changelog: New lint [`string_lit_chars_any`]
There's no explanation anywhere right now of how to do testing with Rust, so here's a basic explanation of how to write and run a test.