Rust
Rust Doctests: Testing Code Examples in Documentation
Rust has a feature that no other mainstream language matches: every code example in your documentation is compiled and run as a test by default. There is no special setup, no framework to install, no annotation to add. Write a /// ``` rust block in your doc comment, and cargo test runs