unittest-cov - results?

0xEAB via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jul 25 12:31:15 PDT 2017


On Wednesday, 5 July 2017 at 19:13:21 UTC, Jolly James wrote:
> On Wednesday, 5 July 2017 at 19:01:06 UTC, Jonathan M Davis 
> wrote:
>> On Wednesday, July 05, 2017 18:50:32 Jolly James via 
>> Digitalmars-d-learn wrote:
>>> On Wednesday, 5 July 2017 at 18:46:38 UTC, Jolly James wrote:
>>> > [...]
>>>
>>> I have changed the 'build' to 'test' in the command. Now at 
>>> least I get the following message: "All unit tests have been 
>>> run successfully." which should not actually happen, as my 
>>> code contains an 'assert(false);' unittest.
>>
>> If you don't run the tests, you won't get any code coverage. 
>> Building with
>>
>> dub test --coverage
>
> The following command does not change anything:
>   dub test --coverage --arch=x86_64 --compiler=ldc2
> All I get is "All unit tests have been run successfully." in 
> the command line.
>
>
>> should do it. As for your assert(false) test failing, was it 
>> in the same module with your main in it?
>
> No, this test is actually in module 'tools.array'.

Hello,

I faced a similar issue today. In my case the utests weren't run 
because they were part of a templated class. They don't get 
executed in such a case because a valid utest mustn't be 
templated.


More information about the Digitalmars-d-learn mailing list