On Fri, 05 Dec 2014 11:53:10 +0000 Chris via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> Now is the right time to confess. I hardly ever use unit tests > although it's included (and encouraged) in D. Why? When I write > new code I "unit test" as I go along, with > > debug writefln("result %s", result); ah, that debug code is so annoying. besides, it requires importing std.stdio, which is not always desirable. and... and... and... you can move it to unittest section and then just run it with rdmd! hee-hoo, now you got best from the both worlds: you can check that your code is working and you have unittests! just don't tell anyone that your carefully crafted unittests are simple debug statements moved to another place. i'm doing that all the time and never been caught.
signature.asc
Description: PGP signature