Why think unit tests should be in their own source code hierarchy instead of side-by-side

Anton Fediushin fediushin.anton at yandex.ru
Thu Mar 22 16:54:18 UTC 2018


On Thursday, 22 March 2018 at 16:30:37 UTC, H. S. Teoh wrote:
> As for the dub-specific problems introduced by 
> version(unittest): IMO that's a flaw in dub.  I should not need 
> to contort my code just to accomodate some flaw in dub.  Having 
> said that, though, I do agree that version(unittest) itself is 
> a bad idea, so code written the way I recommend would not have 
> this problem even given dub's flaws.

There's no "dub-specific problems". Article is wrong about that: 
when you run `dub test` only package you are working with is 
compiled with '-unittest' option. This way it is _impossible_ to 
have any kind of problems with `version(unittest)` if you are 
writing libraries


More information about the Digitalmars-d-announce mailing list