Skip to content

Glossary: Rust Beyond the Basics

doc test

Also written: doc tests, doc comment

A code example inside a `///` doc comment that `cargo test` also runs, so documentation examples stay correct.

Where the book teaches it

Related terms

unit testintegration testcargo test