[WORK] Simple and very useful stuff more of us could get into
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jan 29 15:56:39 PST 2015
On 1/29/15 3:17 PM, FG wrote:
> 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
Funny thing is this obvious-in-hindsight feature has had to go through a
skepticism phase. Thanks Andrej Mitrovic for pushing it through! -- Andrei
More information about the Digitalmars-d
mailing list