Out of Source Unittests

Steven Schveighoffer schveiguy at yahoo.com
Tue Sep 6 09:48:55 PDT 2011


On Tue, 06 Sep 2011 12:42:08 -0400, Tobias Pankrath <tobias at pankrath.net>  
wrote:

> Hi,
>
> 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.

Yes, just move those unit tests into another module.

However, it won't have access to private members.

>
> Also: Is there a library or possibility to turn the "example:" ddoc
> sections into unittests?

That is a oft-requested feature, and I think eventually it will make its  
way into D.

I don't think there's any library that does it currently.

-Steve


More information about the Digitalmars-d-learn mailing list