www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Getting the coverage data at runtime

Hi,

I am wondering if there is any way of getting the code coverage 
at runtime... As a I seen in the runtime, the .lst files are 
created inside this module dealocator:

https://github.com/dlang/druntime/blob/master/src/rt/cover.d#L152

and the `Cover[] gdata;` is private, so no way of accessing it...

I'm asking this because it would be cool to analyse the coverage 
at runtime, after each executed test, for example, to see how 
many lines are covered by a test or to check if the test hits an 
assert, which will be awesome... Or maybe to add other coverage 
formats for better integration with IDEs...

Thanks!
Jun 18