Enabling Only Top-Level Unittests

ZombineDev via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Mar 21 03:37:31 PDT 2016


On Monday, 21 March 2016 at 10:29:36 UTC, Nordlöw wrote:
> I want to enable unittests only at the top-level of a module 
> compilation.
>
> If I have a module
>
>     top.d
>
> that imports
>
>     dep1.d
>     dep2.d
>     ...
>
> which all contain unittests, how do I compile top.d with only 
> the unittests for top.d enabled?

I think the easiest solution is to use 
http://dlang.org/spec/traits.html#getUnitTests and to run the 
tests you want manually.


More information about the Digitalmars-d-learn mailing list