RejectedSoftware Forums

Sign up

Selective Unittests

When I run dub with

dub run --build=unittest

It runs all of the unittests for all my dependencies. These unittests take time, and in some cases, create windows. I would like to simply run the unittests in my own code. Is there an easy way to do this?

Re: Selective Unittests

On 2014-01-04 00:14, Ty Overby wrote:

When I run dub with

 dub run --build=unittest

It runs all of the unittests for all my dependencies.

Really!? That sucks.

These unittests take time, and in some cases, create windows. I would like to simply run the unittests in my own code. Is there an easy way to do this?

You could try the new "dub test" command and see how that works. If
that's not helping you can try this:

$ dmd src/*/.d -unittest -main

The above should work on any Posix system but doesn't work on Windows.
You might need to a import and linker flags for your dependencies.

/Jacob Carlborg

Re: Selective Unittests

Am 04.01.2014 12:43, schrieb Jacob Carlborg:

On 2014-01-04 00:14, Ty Overby wrote:

When I run dub with

 dub run --build=unittest

It runs all of the unittests for all my dependencies.

Really!? That sucks.

These unittests take time, and in some cases, create windows. I would
like to simply run the unittests in my own code. Is there an easy way
to do this?

You could try the new "dub test" command and see how that works. If
that's not helping you can try this:

$ dmd src/*/.d -unittest -main

The above should work on any Posix system but doesn't work on Windows.
You might need to a import and linker flags for your dependencies.

Yes, "dub test" with the latest GIT master should work.