Debugging templates!
Bosak
bosak at gmail.com
Sat Aug 3 08:15:28 PDT 2013
On Saturday, 3 August 2013 at 14:35:52 UTC, JS wrote:
> On Saturday, 3 August 2013 at 14:04:10 UTC, JS wrote:
>> There has to be a better way?!?!?!?!
>
> Of course, I mean string mixin's using template.. and the
> statement was to ask people how they went about it...
I usually write unittests that print the result of the template
to the console to see if everything generates properly. So
instead of:
mixin(Templ!(someArgs));
I write unittest:
unittest {
import std.stdio;
writeln(Templ!(sampleArgs));
}
More information about the Digitalmars-d-learn
mailing list