* Added stringlist and int64 tests

git-svn-id: trunk@41815 -
(cherry picked from commit d13f0c3f80)
This commit is contained in:
michael 2019-04-01 17:04:34 +00:00 committed by florian
parent 84103be6e6
commit e005d72307

View File

@ -22,6 +22,8 @@ type
procedure TestDoubleWrite;
procedure bug16395;
procedure TestAdv;
procedure TestStringList;
Procedure TestInt64;
end;
implementation
@ -171,6 +173,53 @@ begin
{$endif windows}
end;
Procedure TTestBasics.TestStringList;
Var
SL : TStringList;
I : Integer;
begin
With TRegistry.Create do
try
RootKey:=HKEY_CURRENT_USER;
OpenKey('Software/Test',True);
SL:=TstringList.Create;
For I:=0 to 10 do
SL.Add(IntToStr(I));
WriteStringList('me',SL);
SL.Clear;
ReadStringList('me',SL);
For I:=0 to 10 do
AssertEquals('String '+IntToStr(i),IntToStr(I),SL[I]);
finally
Free;
end;
end;
procedure TTestBasics.TestInt64;
Var
Def,I64 : Int64;
begin
def:=MaxInt*1024;
With TRegistry.Create do
try
RootKey:=HKEY_CURRENT_USER;
OpenKey('Software/Test',True);
WriteInt64('you',Def);
I64:=ReadInt64('you');
AssertEquals('Value written and read',Def,I64);
finally
Free;
end;
end;
initialization
RegisterTest(TTestBasics);
end.