svn classes: fixed test

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@137 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
vsnijders
2007-03-30 13:18:56 +00:00
parent 49b0c3d159
commit 479926d209
2 changed files with 6 additions and 4 deletions

View File

@ -484,7 +484,7 @@ end;
procedure TLogEntry.LoadFromNode(ANode: TDOMElement);
var
PathsELement: TDomNode;
PathsElement: TDomNode;
PathElement: TDomNode;
NewLogPath: TLogPath;
begin
@ -495,7 +495,7 @@ begin
PathsElement := ANode.FindNode('paths');
if assigned(PathsELement) then begin
PathElement := PathsELement.FirstChild;
PathElement := PathsElement.FirstChild;
while assigned(PathElement) do begin
if (PathElement.NodeType=ELEMENT_NODE)
and (PathElement.NodeName='path') then

View File

@ -221,6 +221,8 @@ var
SvnLog: TSvnLog;
Files: TStrings;
i: Integer;
const
DeletedFileCount : array[0..5] of byte = (0,1,1,2,0,0);
begin
SvnLog := TSvnLog.Create;
Files := nil;
@ -229,8 +231,8 @@ begin
AssertEquals('Wrong number of log entries', 6, SvnLog.LogEntryCount);
for i := 0 to SvnLog.LogEntryCount - 1 do begin
Files := SvnLog.LogEntry[i].GetFileList;
AssertEquals('Wrong number of files',
SvnLog.LogEntry[i].PathCount, Files.Count);
AssertEquals('Wrong number of files for entry ' + IntToStr(i),
SvnLog.LogEntry[i].PathCount - DeletedFileCount[i], Files.Count);
FreeAndNil(Files);
end;
finally