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 17:15:55 UTC 2018


On Thursday, 22 March 2018 at 17:08:18 UTC, Jonathan M Davis 
wrote:
> I could be wrong, but I am _quite_ sure that dub builds all 
> dependencies with their test targets when you build your 
> project with its test target.

I thought so too, but I just checked and it doesn't do that. I'd 
better create a test repository for that, maybe I'm doing 
something wrong.

> I had to add this to dub.json
>
>     "buildTypes":
>     {
>         "doTests":
>         {
>             "buildOptions": ["unittests", "debugMode", 
> "debugInfo"],
>             "versions": ["dxmlTests"]
>         },
>         "doCov":
>         {
>             "buildOptions": ["unittests", "debugMode", 
> "debugInfo",
>                              "coverage"],
>             "versions": ["dxmlTests"]
>         }
>     }

Well, that's just ugly. And that `versions` thing looks exactly 
like the one from Atila's article.

So? Am I wrong about dub? Let me investigate




More information about the Digitalmars-d-announce mailing list