| Thread overview |
|---|
August 03, 2013 Debugging templates! | ||||
|---|---|---|---|---|
| ||||
There has to be a better way?!?!?!?! | ||||
August 03, 2013 Re: Debugging templates! | ||||
|---|---|---|---|---|
| ||||
Posted in reply to JS | 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...
| |||
August 03, 2013 Re: Debugging templates! | ||||
|---|---|---|---|---|
| ||||
Posted in reply to JS | 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));
}
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply