Visual D 0.3.26 released

PhilE theotherphil at hotmail.com
Sat Aug 10 11:23:59 PDT 2013


On Saturday, 10 August 2013 at 09:29:01 UTC, Rainer Schuetze 
wrote:
>
>
> On 07.08.2013 22:57, PhilE wrote:
>> Apologies if this is totally the wrong place for my questions. 
>> I'm
>> trying to get started with D and I'm using Visual D. I can't 
>> work out
>> how to run unit tests in any module other than that containing 
>> main,
>> either in static libraries or even other modules in the same 
>> library.
>> How is this done? I have the command line parameter -unittest 
>> set, which
>> runs unit tests in the file containing main, but no others.
>
> Running unittests built into libraries is a known problem: 
> http://d.puremagic.com/issues/show_bug.cgi?id=4669
>
> A workaround that is also used in the standard runtime library 
> is to build an executable with the library modules to run the 
> unittests. In Visual D you can make a copy of the project 
> configuration and switch it to output type "executable". Adding 
> "-main" to the additional command line options takes advantage 
> of a feature introduced in dmd 2.063 that avoids having to add 
> "void main() {}" somewhere.

Thanks.


More information about the Digitalmars-d-ide mailing list