Documentation unittests are seriously awesome

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 23 14:46:12 PDT 2016


On Fri, Sep 23, 2016 at 04:42:26PM -0400, Nick Sabalausky via Digitalmars-d 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.

+1, yep, I love it too. This is one of D's underrated killer features.


T

-- 
Life is complex. It consists of real and imaginary parts. -- YHL


More information about the Digitalmars-d mailing list