unit testing

sleek cslush at gmail.com
Tue Jul 15 19:59:07 PDT 2008


Sorry, it seems that the dmd is not the problem here. In fact, what was 
being executed was the following:

dsss build mymodule.d -release

This seems to be compiling unit tests in all the time. I'm not sure why. Can 
anyone help with this?

"sleek" <cslush at gmail.com> wrote in message 
news:g5jmrt$eaf$1 at digitalmars.com...
> Can anyone explain to me the proper way to put a unittest { ... } block 
> into my code so that the only time unit tests get compiled and run is if 
> I'm in a release mode?
>
> I thought that I could simply compile with:
>
> dmd -release mymodule.d
>
> However, when I run the resulting executable the unit tests are getting 
> executed. I can wrap the unittest { ... } block in a debug { ... } block, 
> but is this really the best way?
>
> Thanks for the help
> 




More information about the Digitalmars-d-learn mailing list