The docs have test cases embedded in the markdown. This is a pretty cool use of markdown. I have started doing something similar with markdown in my project. I wonder if other programming languages have done this too.
Rust has this, and it just makes so much sense. Especially when you write a library in which the basic demo is also the basic unit test you want to make. Instead of writing a specific unit test that's hidden in source code, you just embed it in the docs and then you (a) don't have code duplication and (b) have verification your documentation's code samples are actually correct.
> and (b) have verification your documentation's code samples are actually correct.
I find a lot of libraries don't go through the effort to actually use doctests, and just stick `no_run` everywhere, which defeats a lot of the purpose.