Re: Unittest in a library

2015-11-06 Thread Charles via Digitalmars-d-learn
On Friday, 6 November 2015 at 04:34:28 UTC, TheFlyingFiddle wrote: On Friday, 6 November 2015 at 03:59:07 UTC, Charles wrote: 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"); }

Re: Unittest in a library

2015-11-05 Thread TheFlyingFiddle via Digitalmars-d-learn
On Friday, 6 November 2015 at 03:59:07 UTC, Charles wrote: 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 do

Unittest in a library

2015-11-05 Thread Charles via Digitalmars-d-learn
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.