Running unittests in a D library

Jacob Carlborg doob at me.com
Wed Sep 19 12:49:19 PDT 2012


On 2012-09-19 21:34, Jonathan M Davis wrote:

> You don't build it as a library when your unit testing it. You create an empty
> main, compile it all as an executable, and run it. I believe that rdmd --main
> will do this for you (rdmd comes with dmd), but I haven't really used rdmd, so
> I'm not 100% certain.

The problem in that bug report is you can't first compile your library 
as a library and then compile an executable using the library. According 
to the bug report it won't run the unittest blocks from the library.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list