3 ms·
Doc tests are their own thing, right? When I do `cargo test`, it looks like it's doing two passes: one for unit tests (like described in the article), and one f
by majewsky 8y ago
Doc tests are their own thing, right? When I do `cargo test`, it looks like it's doing two passes: one for unit tests (like described in the article), and one for doc tests.
- steveklabnik 8y agoThey still use this infrastructure; think of it as a specific way to construct this kind of test.
- djrenren 8y agoYeah, doc tests are part of rustdoc and they essentially strip out the comments and generate test functions using libtest. I'm not very familiar with the internals, but they're here: https://github.com/rust-lang/rust/blob/master/src/librustdoc/test.rs https://github.com/rust-lang/rust/blob/master/src/librustdoc...