Running unittests in a D library

Jacob Carlborg doob at me.com
Thu Sep 20 11:32:37 PDT 2012


On 2012-09-20 13:14, Jonathan M Davis wrote:
> On Thursday, September 20, 2012 12:34:50 Johannes Pfau wrote:
>> But it should be possible.
>
> I'm not arguing that it shouldn't be possible. I'm just pointing out that it
> wouldn't really be useful. You have to build at least two versions of your
> library anyway (one with -unittest and one without), so being forced to build
> your library as a binary for unit tests really isn't a big deal IMHO. But I
> have no problem with it working to link in a library built with -unittest and
> have its unit tests run.

You'll most likely have a release and debug version anyway. Just put the 
unit tests in the debug version.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list