trident-job / delphi-code-coverage

Automatically exported from code.google.com/p/delphi-code-coverage
0 stars 0 forks source link

Wrong coverage generated when for units using generics #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When you use generics in your code coverage generated for some units that 
should not be covered and not generated for some units that should be covered

What steps will reproduce the problem?

First scenario
1. Use standard generic collection in unit that you are testing
2. In .map file it will look like this

Line numbers for uYourUnit(System.Generics.Collections.pas) segment .text

In this case breakpoints are set and coverage is generated for 
System.Generics.Collections.pas but they should not because this unit is not 
specified in parameters for coverage.

Second scenario
1. Create your own generic class
2. Create unit tests in which you instantiate this class
3. In .map file it will look like this

Line numbers for uYourUnitTest(YourGenericClass.pas) segment .text

In this case coverage for YourGenericClass.pas is not generated because 
uYourUnitTest is not included in parameters, but it actually should be 
generated because YourGenericClass.pas is included in parameters for coverage.

Original issue reported on code.google.com by e.kotlya...@gmail.com on 26 Apr 2012 at 5:40

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r99.

Original comment by e.kotlya...@gmail.com on 26 Apr 2012 at 7:44