-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Implement doc tests #302
Merged
Merged
Implement doc tests #302
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sweeeet. |
Is this good to go now that the rustdoc bug is fixed? |
Yes, this should be good to go. |
The logic for doc tests will get a little complex, so this is moved to aseparate module instead of inside the executable.
Whenever `cargo test` is run and a testable library target is available, the doc tests will be run. This can be opted out of with `test = false` as usual. This is currently not super useful due to rust-lang/rust#16157, but I expect that to be merged soon. In the meantime examples will need to `extern crate foo` explicitly.
Blocked on rust-lang/rust#16275 |
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this pull request
Aug 6, 2014
There's a good long comment explaining why. The tl;dr; is that I have no idea why this is necessary, but it gets --test to work on windows which is something, right? cc rust-lang#13259 cc rust-lang#16275 cc rust-lang/cargo#302
bors
added a commit
that referenced
this pull request
Aug 6, 2014
Whenever `cargo test` is run and a testable library target is available, the doc tests will be run. This can be opted out of with `test = false` as usual. This is currently not super useful due to rust-lang/rust#16157, but I expect that to be merged soon. In the meantime examples will need to `extern crate foo` explicitly. Closes #334
bors
added a commit
to alexcrichton/cargo
that referenced
this pull request
Sep 2, 2014
Whenever `cargo test` is run and a testable library target is available, the doc tests will be run. This can be opted out of with `test = false` as usual. This is currently not super useful due to rust-lang/rust#16157, but I expect that to be merged soon. In the meantime examples will need to `extern crate foo` explicitly. Closes rust-lang#334
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Whenever
cargo test
is run and a testable library target is available, the doctests will be run. This can be opted out of with
test = false
as usual.This is currently not super useful due to rust-lang/rust#16157, but I expect
that to be merged soon. In the meantime examples will need to
extern crate foo
explicitly.
Closes #334