trident-job / delphi-code-coverage

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

Exception when generating coverage for non-existing files #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Compile following project in Delphi XE2 (not sure about older versions)
program Project1;

{$APPTYPE CONSOLE}

{$R *.res}

uses
  System.SysUtils,
  Classes,
  Generics.Defaults,
  Generics.Collections;

var
  Dictionary: TObjectDictionary<integer, TComponent>;
begin
  try
    Dictionary := TObjectDictionary<integer, TComponent>.Create;
  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
end.

Run code coverage as 
CodeCoverage.exe -e Project1.exe -u Project1 -sd "C:\Documents and 
Settings\Administrator\My Documents\RAD Studio\Projects\test2\"  -lt

What is the expected output? What do you see instead?

got exception
Exception during generation of unit coverage for:System.Generics.Defaults.pas 
could not open:System.Generics.Defaults.pas
Current directory:C:\Documents and Settings\Administrator\My Documents\RAD 
Studio\Projects\test2
Exception during generation of unit coverage for:System.Generics.Defaults.pas 
exception:I/O error 103

With attached patch it will ignore units that are not specified in -u switch

Original issue reported on code.google.com by e.kotlya...@gmail.com on 6 Mar 2012 at 10:59

Attachments:

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

Original comment by e.kotlya...@gmail.com on 27 Mar 2012 at 12:34