Browse Source

* fixed TList tests

git-svn-id: branches/cleanroom@10354 -
Vincent Snijders 17 years ago
parent
commit
27cf525749
2 changed files with 3 additions and 23 deletions
  1. 2 2
      rtl/tests/fplists.pp
  2. 1 21
      rtl/tests/tclist.pp

+ 2 - 2
rtl/tests/fplists.pp

@@ -1,4 +1,4 @@
-{$mode objpas}
+{$mode objfpc}
 unit fplists;
 
 interface
@@ -104,7 +104,7 @@ end;
 procedure TLinkedList.RemoveItem(Item: TLinkedListItem; FreeItem : Boolean = False);
 
 Var
-  I,P : TLinkedListItem;
+  I : TLinkedListItem;
 
 begin
   If (Item<>Nil) and (FRoot<>Nil) then

+ 1 - 21
rtl/tests/tclist.pp

@@ -121,7 +121,7 @@ begin
   If ACount+AOffSet>20 then
     Fail('Too many elements added to list. Max is 20');
   For I:=1+AOffSet to AOffSet+ACount do
-    List.Add(@Pointers[i]);
+    AList.Add(@Pointers[i]);
 end;
 
 procedure TTestTList.TestCreate;
@@ -315,20 +315,12 @@ begin
 end;
 
 procedure TTestTList.TestExtractResult;
-
-Var
-  I : Integer;
-
 begin
   FillList(9);
   AssertEquals('Extracting pointers[4]',@Pointers[4],List.Extract(@Pointers[4]));
 end;
 
 procedure TTestTList.TestExtractCount;
-
-Var
-  I : Integer;
-
 begin
   FillList(9);
   List.Extract(@Pointers[4]);
@@ -336,10 +328,6 @@ begin
 end;
 
 procedure TTestTList.TestExtractNonExisting;
-
-Var
-  I : Integer;
-
 begin
   FillList(9);
   List.Extract(@List);
@@ -347,20 +335,12 @@ begin
 end;
 
 procedure TTestTList.TestExtractNonExistingResult;
-
-Var
-  I : Integer;
-
 begin
   FillList(9);
   AssertEquals('Extracting unexisting, result is nil',Nil,List.Extract(@List));
 end;
 
 procedure TTestTList.TestExtractOnlyFirst;
-
-Var
-  I : Integer;
-
 begin
   FillList(9);
   List.Insert(0,@Pointers[4]);