Out of Source Unittests

bearophile bearophileHUGS at lycos.com
Tue Sep 6 10:18:37 PDT 2011


Tobias Pankrath:

> Which is IMO a showstopper.

Because in D unittests are meant to be put beside the code they test. If you go against the language, you sometimes find troubles :-)

> How do you handle your unit tests? I am now stuffing everything related
> to unit tests at the bottom of the module into an private scope

I think the normal way to lay D unittests is:

function A
unittest of A
function B
unittest of B
Class C
unittest of C
...

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list