Skip to content

Glossary: Rust Beyond the Basics

unit test

Also written: unit tests

A test written next to your code, in a `#[cfg(test)] mod tests`, that can test even private functions.

Where the book teaches it

Related terms

integration testdoc test#[test]