codetools: fixed testfpcsrcunitrules when no ppu exists

git-svn-id: trunk@26836 -
This commit is contained in:
mattias 2010-07-26 10:08:00 +00:00
parent 1ce765fdda
commit 288d85bcae

View File

@ -322,6 +322,7 @@ begin
Units:=UnitSet.GetConfigCache(false).Units;
// first list all duplicates with a ppu file (important)
if Units<>nil then begin
Cnt:=0;
Node:=SrcDuplicates.Tree.FindLowest;
while Node<>nil do begin
@ -337,6 +338,7 @@ begin
Node:=SrcDuplicates.Tree.FindSuccessor(Node);
end;
if Cnt>0 then writeln;
end;
// then list all duplicates without a ppu file (unimportant)
Cnt:=0;
@ -345,8 +347,7 @@ begin
Item:=PStringToStringTreeItem(Node.Data);
aUnitName:=Item^.Name;
Files:=Item^.Value;
PPUFile:=Units[aUnitName];
if PPUFile='' then begin
if (Units=nil) or (Units[aUnitName]='') then begin
if Cnt=0 then writeln;
inc(Cnt);
writeln('HINT: duplicate source files: unit=',aUnitName,' files=',Files);