Skip to content
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

Merged
merged 1 commit into from
Jan 3, 2014
Merged

Testing tutorial #11052

merged 1 commit into from
Jan 3, 2014

Conversation

jvns
Copy link
Contributor

@jvns jvns commented Dec 18, 2013

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.

@alexcrichton
Copy link
Member

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.

@jvns
Copy link
Contributor Author

jvns commented Dec 18, 2013

Added the contents of https://github.com/mozilla/rust/wiki/Doc-unit-testing, per @cmr's suggestion

@emberian
Copy link
Member

Wrap the lines to 100 chars and it's golden. @alexcrichton do you think it's better now?

@alexcrichton
Copy link
Member

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.

@jvns
Copy link
Contributor Author

jvns commented Dec 18, 2013

Is the content from the wiki wrong?

@brson
Copy link
Contributor

brson commented Dec 20, 2013

There does seem to be a general consensus about moving docs out of the wiki and testing is a good topic.

@adrientetar
Copy link
Contributor

@jvns Could you squash your commits into one?

@jvns
Copy link
Contributor Author

jvns commented Dec 31, 2013

Squashed!

@adrientetar
Copy link
Contributor

r? @brson

bors added a commit that referenced this pull request Jan 3, 2014
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.
@bors bors closed this Jan 3, 2014
@bors bors merged commit f032237 into rust-lang:master Jan 3, 2014
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 31, 2023
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`]
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.

6 participants