Documentation unittests are seriously awesome

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 23 17:32:00 PDT 2016


On 09/23/2016 04:42 PM, Nick Sabalausky wrote:
> Just had to say it. Been using it a lot this week.
>
> Referring to this stuff:
>
> ----------------------------
> /// Does foo stuff
> void foo()
> {}
>
> ///
> unittest
> {
>     // Tests and docs in one, 2-for-1 win!
> }
> ----------------------------
>
> And all just built-in. Freaking sweet.

We owe this to Andrej Mitrovic IIRC! -- Andrei


More information about the Digitalmars-d mailing list