Out of Source Unittests

bearophile bearophileHUGS at lycos.com
Tue Sep 6 10:16:14 PDT 2011


Tobias Pankrath:

> is there any well supported way to store the unittest code in different
> files then the actual code? I really don't like to clutter my code with 
> tests or test helper functions.

Unittests too are code. I suggest to keep unittests close to the code they test because this is handy (unless there are a large amount of tests).
D has nestable functions, so you are often able to put the helper functions inside the unittests.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list