version(unittest) in imported modules
Dicebot
public at dicebot.lv
Sun Mar 2 10:36:15 PST 2014
On Sunday, 2 March 2014 at 18:07:11 UTC, Peter Alexander wrote:
> dmd -unittest foo.d
>
> Then version(unittest) blocks will be run inside modules that
> `foo` imports, even though the unittests for those modules will
> not run.
>
> Two questions:
>
> 1. Is this a bug?
>
> 2. If not, how can I tell if unittests are running in *this*
> module?
Works as intended I say. With `rdmd -unittest foo.d` all test
from imported modules will be run, it just happens that raw dmd
does not compile imports automatically. So your second question
does not really make sense - all tests are always run everywhere.
More information about the Digitalmars-d
mailing list