On Wed, 04 Aug 2010 12:50:45 +0000, Ettienne Gilbert wrote: > I have even - in desperation [did not really think it would work] - > tried to pass "--main" as an argument to the compiler [described by > Andrei in "The D Programming Language" in $5.1 on p133], in the hope > that I can fool the compiler to create a exe, rather than a lib for the > debug version of the lib. But DMD2.047 does seem to like this compiler > switch! > > How does one get unit-tests that are inside modules in a lib to run? > > Thanks, > Ettienne
Unit tests are run prior to the execution of main. So you must run the program for the Unittests to run. Also --main is a switch for rdmd and not dmd.