Unit Threaded - a unit testing library for D
Atila Neves
atila.neves at gmail.com
Tue Aug 27 09:55:09 PDT 2013
I haven't had a problem with compile times. Ideally the test code
should be small and well-separated into modules so I'm not too
worried about that (the compile-time scanning only happens on the
test modules).
As for the registration, it was one of my goals to not have to do
any. You could still conceivably loop at compile-time with a
foreach on a tuple and generate the required test functions /
classes. In my experience there's usually no need for that kind
of thing, but YMMV.
> However I use a different approach, which I find easier to
> handle: I'm using the build-in unittest blocks to register
> delegates as tests in a central table. These than get executed
> by a test runner in main().
>
> This way you can register multiple tests using i.e. a loop over
> sample data or something similar. And it's very easy to
> implement and has almost no impact on compile time.
More information about the Digitalmars-d-announce
mailing list