mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 14:31:35 +02:00
* Fixed wrong buffers in the XML registry test.
git-svn-id: trunk@48418 -
This commit is contained in:
parent
67fcf0f03e
commit
1112e9f301
@ -94,13 +94,13 @@ begin
|
|||||||
SetLength(S1,100);
|
SetLength(S1,100);
|
||||||
For I:=0 to 99 do
|
For I:=0 to 99 do
|
||||||
S1[I]:=i;
|
S1[I]:=i;
|
||||||
XMLReg.SetValueData('b',dtBinary,S1[1],Length(S1));
|
XMLReg.SetValueData('b',dtBinary,S1[0],Length(S1));
|
||||||
XMLReg.Flush;
|
XMLReg.Flush;
|
||||||
DS:=SizeOf(S1) div 4;
|
DS:=Length(S1) div 4;
|
||||||
SetLength(S2,DS);
|
SetLength(S2,DS);
|
||||||
For I:=0 to DS-1 do
|
For I:=0 to DS-1 do
|
||||||
S2[I]:=i;
|
S2[I]:=i;
|
||||||
AssertEquals('Cannot read, buffer size too small',False,XMLReg.GetValueData('b',dt,S2[1],ds));
|
AssertEquals('Cannot read, buffer size too small',False,XMLReg.GetValueData('b',dt,S2[0],DS));
|
||||||
AssertTrue('Correct data type reported',dt=dtBinary);
|
AssertTrue('Correct data type reported',dt=dtBinary);
|
||||||
AssertEquals('Correct data buffer size reported',Length(S1),DS);
|
AssertEquals('Correct data buffer size reported',Length(S1),DS);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user