tests: fixed compilation with fpc 2.3.1 (which doesn't allow to pass literal const to formal const parameters)

git-svn-id: trunk@14777 -
This commit is contained in:
vincents 2008-04-07 12:09:02 +00:00
parent 15b967a601
commit ef62bac367
2 changed files with 15 additions and 12 deletions

View File

@ -40,22 +40,25 @@ end;
procedure TTestBug8432.Test_itu4_1;
var
Key: Integer;
AInt: Integer;
begin
FMap:=TMap.Create(itu4,SizeOf(Integer));
with FMap do
begin
AInt:=10;
Add(1,AInt);
AInt:=20;
Add(2,AInt);
AInt:=30;
Add(3,AInt);
GetData(1,AInt);
for Key := 1 to 3 do
begin
AInt:=Key* 10;
Add(Key,AInt);
end;
Key := 1;
GetData(Key,AInt);
AssertEquals('Wrong entry for 1', 10, AInt);
GetData(2,AInt);
Key := 2;
GetData(Key,AInt);
AssertEquals('Wrong entry for 2', 20, AInt);
GetData(3,AInt);
Key := 3;
GetData(Key,AInt);
AssertEquals('Wrong entry for 3', 30, AInt);
end;
end;

View File

@ -2,7 +2,7 @@
<CONFIG>
<ProjectOptions>
<PathDelim Value="\"/>
<Version Value="5"/>
<Version Value="6"/>
<General>
<SessionStorage Value="InIDEConfig"/>
<MainUnit Value="0"/>
@ -23,13 +23,13 @@
</RunParams>
<RequiredPackages Count="3">
<Item1>
<PackageName Value="LCL"/>
<PackageName Value="FCL"/>
</Item1>
<Item2>
<PackageName Value="fpcunitconsolerunner"/>
</Item2>
<Item3>
<PackageName Value="FCL"/>
<PackageName Value="LCL"/>
</Item3>
</RequiredPackages>
<Units Count="4">