Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
December 05, 2005 Code-coverage | ||||
---|---|---|---|---|
| ||||
My source files are spread in directories in java style. How can I do code coverage for all sources ? with just -cov option, no .lst files are created. Thanks in advance Sai |
December 06, 2005 Re: Code-coverage | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sai | Sai wrote:
> My source files are spread in directories in java style. How can I do code
> coverage for all sources ?
>
> with just -cov option, no .lst files are created.
>
> Thanks in advance
> Sai
>
>
>
Hope you're not jumping the gun, but the .lst files are generated when the program is run. I haven't tried a multi-directory style D app with -cov, but it works with a single-directory app.
|
December 06, 2005 Re: Code-coverage | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sai | Sai wrote:
> My source files are spread in directories in java style. How can I do code
> coverage for all sources ?
>
> with just -cov option, no .lst files are created.
>
> Thanks in advance
> Sai
>
>
>
Yea, there should only be 1 .lst file created for your program. Compile your D program to an exe, then run 'dmd my.exe -cov'
|
December 06, 2005 Re: Code-coverage | ||||
---|---|---|---|---|
| ||||
Posted in reply to clayasaurus | clayasaurus wrote:
> Sai wrote:
>
>> My source files are spread in directories in java style. How can I do code
>> coverage for all sources ?
>>
>> with just -cov option, no .lst files are created.
>>
>> Thanks in advance
>> Sai
>>
>>
>>
>
> Yea, there should only be 1 .lst file created for your program. Compile your D program to an exe, then run 'dmd my.exe -cov'
Nevermind. My advice is to use build with the -cov option, then after you run your exe the .lst file should be created. Although in the bugs forum it looks like someone is having trouble with it.
|
December 16, 2005 Re: Code-coverage | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sai | Now I understand, why no .lst files were created for my program. I was always exiting using std.c.stdlib.exit(0); which wasn't exiting cleanly. Today by mistake, due to an exception, when the program exited through return in "main", all .lst files were created ! Is there any clean way of exiting (or aborting) in D ? Thanks in advance Sai In article <dn2dur$2bur$1@digitaldaemon.com>, Sai says... > >My source files are spread in directories in java style. How can I do code coverage for all sources ? > >with just -cov option, no .lst files are created. > >Thanks in advance >Sai > > > |
December 16, 2005 Re: Code-coverage | ||||
---|---|---|---|---|
| ||||
Posted in reply to sai | sai wrote:
> Now I understand, why no .lst files were created for my program.
>
> I was always exiting using std.c.stdlib.exit(0); which wasn't exiting cleanly. Today by mistake, due to an exception, when the program exited
> through return in "main", all .lst files were created !
>
> Is there any clean way of exiting (or aborting) in D ?
Nothing official, though you could try this:
throw new Exception("Terminate called.");
Sean
|
Copyright © 1999-2021 by the D Language Foundation