Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
March 23, 2013 Add coverage highlighting to IDE | ||||
---|---|---|---|---|
| ||||
Just an idea for an IDE. At the push of a button, run the unittests with -cov on the module being editted, read the coverage listing file, and then highlight the code lines that were never executed. |
March 27, 2013 Re: Add coverage highlighting to IDE | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Saturday, 23 March 2013 at 23:14:59 UTC, Walter Bright wrote:
> Just an idea for an IDE.
>
> At the push of a button, run the unittests with -cov on the module being editted, read the coverage listing file, and then highlight the code lines that were never executed.
How to run only one module('s unittests)? With rdmd? Or just via dmd with a specific flag set?
|
March 27, 2013 Re: Add coverage highlighting to IDE | ||||
---|---|---|---|---|
| ||||
Posted in reply to alex | On Wednesday, 27 March 2013 at 12:08:00 UTC, alex wrote: > On Saturday, 23 March 2013 at 23:14:59 UTC, Walter Bright wrote: >> Just an idea for an IDE. >> >> At the push of a button, run the unittests with -cov on the module being editted, read the coverage listing file, and then highlight the code lines that were never executed. > > How to run only one module('s unittests)? With rdmd? Or just via dmd with a specific flag set? With a custom unit test runner like this one: https://github.com/D-Programming-Language/druntime/blob/master/src/test_runner.d |
March 27, 2013 Re: Add coverage highlighting to IDE | ||||
---|---|---|---|---|
| ||||
Posted in reply to alex | On Wednesday, 27 March 2013 at 12:08:00 UTC, alex wrote:
> On Saturday, 23 March 2013 at 23:14:59 UTC, Walter Bright wrote:
>> Just an idea for an IDE.
>>
>> At the push of a button, run the unittests with -cov on the module being editted, read the coverage listing file, and then highlight the code lines that were never executed.
>
> How to run only one module('s unittests)? With rdmd? Or just via dmd with a specific flag set?
I think Walter (?) added a flag to dmd:
-main add default main() (e.g. for unittesting)
Maybe runnng dmd with this flag on 1 module and then running it could help?
|
March 31, 2013 Re: Add coverage highlighting to IDE | ||||
---|---|---|---|---|
| ||||
Posted in reply to alex | On Wednesday, 27 March 2013 at 12:08:00 UTC, alex wrote: > On Saturday, 23 March 2013 at 23:14:59 UTC, Walter Bright wrote: >> Just an idea for an IDE. >> >> At the push of a button, run the unittests with -cov on the module being editted, read the coverage listing file, and then highlight the code lines that were never executed. > > How to run only one module('s unittests)? With rdmd? Or just via dmd with a specific flag set? I think you have to take a look at : http://dlang.org/code_coverage.html It seems you just have to call dmd with the module name and -cov option as parameter. I used eclemma plugin for coverage highlighting on Eclipse, and a usefull feature is the capability to use layered result which allow you to increase the cover by using many configurations. Unit tests with highlighting decrease a little the need of debuggers, because using asserts or conditions aren't harder to use break points. Maybe it will be necessary to add names on tests. |
April 04, 2013 Re: Add coverage highlighting to IDE | ||||
---|---|---|---|---|
| ||||
Posted in reply to nazriel | On 3/27/2013 3:10 PM, nazriel wrote:
> On Wednesday, 27 March 2013 at 12:08:00 UTC, alex wrote:
>> On Saturday, 23 March 2013 at 23:14:59 UTC, Walter Bright wrote:
>>> Just an idea for an IDE.
>>>
>>> At the push of a button, run the unittests with -cov on the module being
>>> editted, read the coverage listing file, and then highlight the code lines
>>> that were never executed.
>>
>> How to run only one module('s unittests)? With rdmd? Or just via dmd with a
>> specific flag set?
>
> I think Walter (?) added a flag to dmd:
> -main add default main() (e.g. for unittesting)
>
> Maybe runnng dmd with this flag on 1 module and then running it could help?
Yup. That's just what -main is for!
|
June 07, 2013 Re: Add coverage highlighting to IDE | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | 24.03.2013 3:14, Walter Bright пишет: > Just an idea for an IDE. > > At the push of a button, run the unittests with -cov on the module being > editted, read the coverage listing file, and then highlight the code > lines that were never executed. As mentioned in [1] it is implemented in Visual D now. See Visual D's news [2]. [1] http://forum.dlang.org/thread/kml75b$1jm$1@digitalmars.com?page=2#post-ko7i81:24ng4:241:40digitalmars.com [2] http://www.dsource.org/projects/visuald/wiki/News36 -- Денис В. Шеломовский Denis V. Shelomovskij |
Copyright © 1999-2021 by the D Language Foundation