Re:The internals of testing in Rust in 2018
by majewsky on Monday July 23, 2018 @06:08PM
(#17596414)
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.
[ Parent
| on HN ]
Re:The internals of testing in Rust in 2018
by djrenren on Monday July 23, 2018 @06:24PM
(#17596518)
Yeah, 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...
Re:The internals of testing in Rust in 2018
by steveklabnik on Monday July 23, 2018 @06:21PM
(#17596499)
They still use this infrastructure; think of it as a specific way to construct this kind of test.