Awesome: asserts turn into writeln for ddoc'd unit tests

Jonathan Marler johnnymarler at gmail.com
Mon Sep 18 02:40:00 UTC 2017


On Sunday, 17 September 2017 at 21:36:51 UTC, Seb wrote:
> On Sunday, 17 September 2017 at 18:30:51 UTC, Steven 
> Schveighoffer wrote:
>> This is something I didn't realize happened (I remember 
>> discussing it a while back). Awesome work whoever did it, and 
>> works great!
>
> Yeah we even had a short post about it: 
> https://github.com/dlang/dlang.org/blob/master/assert_writeln_magic.d
>
>> Very cool :)
>
> Thanks!!
>
>> A question: is this for all libraries, or is it a special case 
>> for dlang.org?
>
> It's done with libdparse and only for dlang.org.
> The code is actually really simple in case you are interested:
>
> https://github.com/dlang/dlang.org/blob/master/assert_writeln_magic.d

I'm having a hard time seeing the benefits of this feature, could 
you share some examples or mention some reasons how this 
transformation is helpful? Not trying to attack the feature, just 
curious. Thanks.


More information about the Digitalmars-d mailing list