Forum Discussion

Nuramon's avatar
Nuramon
Occasional Contributor
15 years ago

Coverage Profiling - Delphi 2010 - Problems with Generics

Hello everyone,



We have encountered some problems with coverage profiling for Delphi 2010 in units which use Generics. I was able to reproduce the unexpected (wrong?) results it in the Delphi-Project attached to this posting. The problems are:


  1. The constructor of generic classes is not covered correctly in the "Editor"-view (in the example attached: constructor of class TBag). It seems that the green dots for the constructor are moved down some rows (see screenshot "Error_1.gif"). In the "Report"-Table the method is listed as fully covered (100%), which is the right result. So maybe it is just a display error. If I remove the generic-parameter from the class everything works correctly.

  2. Methods with generic parameters are not listed as covered code at all (in the example attached: method Exchange() of class TGenericMethod, respectively see screenshot "Error_2.gif"). The code is definitly called by the executable.


Are we doing anything wrong? Or are there known issues in AQtime with Delphi & Generics?



Thanks for help.



Best regards

Thomas

6 Replies

  • Nuramon's avatar
    Nuramon
    Occasional Contributor
    Hello everyone,



    Nobody here who can help with my problem? Or at least validate the mentioned behaviour?



    Best regards

    Thomas

  • Hi Thomas,





    We have fixed some problems related to the Generics feature in AQtime 6.40 (the latest update).

    Please try using this version and let me know how it works for you.
  • Nuramon's avatar
    Nuramon
    Occasional Contributor
    Hello Alex,



    Thanks for your response. When writing the post above I was using AQtime
    6.40 already (to be more precise: I used AQtime 6.40.485.64 on Windows 7 64bit). I'm quite sure my compiler-settings are right (choosen according to the manual), because coverage reports for classes without generics work fine for me.



    Please let me know if you need further information from me.



    Best regards

    Thomas



  • Hello Thomas,





    It looks like we have reproduced the problem with a Delphi 2010 application. Currently, it seems that there is an issue with the debug information produced by the Delphi compiler. We will contact Embarcadero to sort things out. When we have some results, I will post them to this thread.

  • Hello Thomas,





    An update on this issue:

    It was a problem in the Delphi 2010 compiler, it produced incorrect debugging information.

    The problem is resolved in the latest Beta build of Delphi 2011.

    So, the original problem will disappear after the Delphi 2011 release.
  • Nuramon's avatar
    Nuramon
    Occasional Contributor
    Hello Alex,



    Thanks for this information. We will give Delphi 2011 a try after the final release.



    Kind regards

    Thomas