On 2015-01-29 at 23:52, H. S. Teoh via Digitalmars-d wrote:
This is the so-called "documented unittest" or "ddoc'd unittest". It's an awesome feature implemented (IIRC) by Andrey Mitrovic that ensures that generated doc examples are compilable and runnable. Preferably all code examples in Phobos should be ddoc'd unittests, so that they won't suffer from bitrot.
Yes, it's great. Documentation and unittest combined, DRY, like Python's doctest. It really should be mentioned on http://dlang.org/ddoc.html
