* fixed test

git-svn-id: trunk@13361 -
This commit is contained in:
florian 2009-07-04 16:29:59 +00:00
parent 04402dd6cc
commit ea4d5a74c2

View File

@ -9,7 +9,7 @@ type
public public
procedure do_something; procedure do_something;
end; end;
tcoll = class(TCollection) tcoll = class(TCollection)
public public
procedure Update(Item: TCollectionItem); override; procedure Update(Item: TCollectionItem); override;
@ -17,7 +17,7 @@ type
var var
c: tcoll; c: tcoll;
item: titem; item: titem;
i: Integer; i: Integer;
update_counter: Integer; update_counter: Integer;
@ -36,7 +36,7 @@ end;
begin begin
c := tcoll.Create(titem); c := tcoll.Create(titem);
item := titem(c.Add); item := titem(c.Add);
update_counter := 0; update_counter := 0;
c.BeginUpdate; c.BeginUpdate;
try try
for i := 0 to 9 do for i := 0 to 9 do
@ -45,7 +45,11 @@ begin
c.EndUpdate; c.EndUpdate;
end; end;
writeln('updates: ', update_counter); writeln('updates: ', update_counter);
c.Free;
if update_counter<>1 then if update_counter<>1 then
Halt(1); begin
end. c.Free;
Halt(1);
end;
c.Free;
writeln('ok');
end.