Problem with unittest in templates.
Peter C. Chapin
pchapin at sover.net
Sat Dec 30 06:08:40 PST 2006
Chris Nicholson-Sauls <ibisbasenji at gmail.com> wrote in
news:en3n33$1vck$1 at digitaldaemon.com:
> While this is most certainly a bug, for the meantime you could try
> writing a module level unittest block for your template. Something
> like:
>
> # class Foo (T) {
> # // ...
> # }
> # unittest {
> # // ...
> # }
That's cool. I didn't realize you could do that. This has the advantage
in this case of not requiring the unittest block to be generic. I find
building completely generic tests that are also reasonably exhaustive to
be something of a challenge.
Peter
More information about the Digitalmars-d-learn
mailing list