Unittest in a library

Charles via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Nov 5 19:59:05 PST 2015


Is it possible to have unittest blocks if I'm compiling a library?

I've tried having this:

test.d:

     class Classy {
         unittest { assert(0, "failed test"); }
     }


and then build it with `dmd test.d -lib -unittest` and it doesn't 
fail the unittest.


More information about the Digitalmars-d-learn mailing list