www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Split D class file

reply Robert Fraser <fraserofthenight gmail.com> writes:
redsea Wrote:

 code coverage report can not support mixin template :(

I'll need to see how the code coverage ABI works, but it might be more than possible that code coverage for those lines are tracked but there's no way to display it. If that's the case, some IDE might someday be able to expand the templates inline and ho coverage, or alternatively aggregate this data and show coverage for an entire template (and maybe use pretty colored lines to do so if you ask nice). "someday" being the keyword.
Sep 23 2007
parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Robert Fraser" <fraserofthenight gmail.com> wrote in message 
news:fd6odt$14qt$1 digitalmars.com...
 redsea Wrote:

 code coverage report can not support mixin template :(

I'll need to see how the code coverage ABI works, but it might be more than possible that code coverage for those lines are tracked but there's no way to display it. If that's the case, some IDE might someday be able to expand the templates inline and ho coverage, or alternatively aggregate this data and show coverage for an entire template (and maybe use pretty colored lines to do so if you ask nice). "someday" being the keyword.

It keeps what amounts to a large static array of ints (longs?), and inserts an "inc [address of counter that corresponds to this line]" instruction after each line of functional code. To that end, it'd have to keep track of every instantiation of a template, be it mixed in or whatever, and count all those instantiations' lines separately. It'd probably also have to indicate which instantiation of the template each line count was for.
Sep 23 2007
parent reply Robert Fraser <fraserofthenight gmail.com> writes:
Jarrett Billingsley Wrote:

 "Robert Fraser" <fraserofthenight gmail.com> wrote in message 
 news:fd6odt$14qt$1 digitalmars.com...
 redsea Wrote:

 code coverage report can not support mixin template :(

I'll need to see how the code coverage ABI works, but it might be more than possible that code coverage for those lines are tracked but there's no way to display it. If that's the case, some IDE might someday be able to expand the templates inline and ho coverage, or alternatively aggregate this data and show coverage for an entire template (and maybe use pretty colored lines to do so if you ask nice). "someday" being the keyword.

It keeps what amounts to a large static array of ints (longs?), and inserts an "inc [address of counter that corresponds to this line]" instruction after each line of functional code. To that end, it'd have to keep track of every instantiation of a template, be it mixed in or whatever, and count all those instantiations' lines separately. It'd probably also have to indicate which instantiation of the template each line count was for.

I _was_ assuming it already did these things, but now I'm assuming not...
Sep 23 2007
parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Robert Fraser" <fraserofthenight gmail.com> wrote in message 
news:fd6osr$15j1$1 digitalmars.com...
 I _was_ assuming it already did these things, but now I'm assuming not...

Don't know about all possible cases, but a simple test using a templated function shows that it collapses the counts for all instantiations of the template into one. So if you call three separate specializations of the templated function, it'll show (in the listing) the templated function having been called three times, instead of splitting up the specializations.
Sep 23 2007