Skip to content

Glossary: Software Design Patterns in Rust

#[test]

Also written: test runner, unit test

An attribute marking a function that the test runner calls for you. A test passes if it doesn't panic.

Where the book teaches it

Related terms

#[cfg(test)]assert_eq!Inversion of control