D import idiom compilation time

FR86 fr58426 at gmail.com
Mon Jan 7 22:15:45 UTC 2019


On Monday, 7 January 2019 at 18:11:51 UTC, Seb wrote:
> `version(unittest)` will also be defined if a user uses your 
> library for testing his code. If you really want to, you could 
> set a special version via dub, e.g.:
>
> ```
> configuration "unittest" {
>     version "LocalImportUnittest"
> }
> ```

Done!

> Also, you need to e.g. split up your test into two as otherwise 
> you won't test whether the first part of the test (or the 
> second for that matter) actually throws. You are currently 
> doing an XOR in both parts.

Oops! Fixed.

Thanks for the feedback, much appreciated!


More information about the Digitalmars-d mailing list