Strategies for resolving cyclic dependencies in static ctors

Nick Sabalausky a at a.a
Thu Mar 24 13:48:50 PDT 2011


"Graham St Jack" <Graham.StJack at internode.on.net> wrote in message 
news:imem32$o4d$1 at digitalmars.com...
>
> I would be interested to hear some success stories for the 
> unittest-keyword approach. So far I can't see any up-side.
>

If it weren't for the unittests working the way they do, I probably never 
would have gotten around to using them. And after I started using them, I 
ended up taking those extra steps to make the unittests run in a separate 
program, and to make utilities to work around what I saw as the limitations: 
http://www.dsource.org/projects/semitwist/browser/trunk/src/semitwist/util/unittests.d 
(In particuler, unittestSection, and the "autoThrow" modification to 
Jonathan's assertPred. The deferAsser/deferEnsure are probably going away, 
superceeded by Jonathan's assertPred.)

So D's unittests working the way they do got me to actually use them. By 
contrast, my Haxe code has very little unittesting.




More information about the Digitalmars-d mailing list