www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Unittest compiling into file with main.

I was playing arround with compiling and found that my unittest were 
getting compiled into the file that has main() rather than the file they 
were defined in.  Is this the intended result and, if so why?

Example:
unittest are in unit.d, main() is in main.d.

$ dmd -c unit.d
$ dmd -c -unittest main.d
$ dmd main.o unit.o
./main
--- unittest run ---
$ dmd -c -unittest unit.d
$ dmd -c main.d
$ dmd main.o unit.o
./main
--- unittest don't run ---

Thats all, thanks.
Feb 26 2012