Skip to content

Commit 7623fe0

Browse files
author
andrey.gruzdev
committed
test fixes for win64
1 parent 57579b7 commit 7623fe0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

PythonForDelphi/Components/Sources/Core/UnitTests/MethodCallBackTest.pas

+6-2
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ procedure TMethodCallbackTest.Teardown;
110110
end;
111111

112112
procedure TMethodCallbackTest.TestBug01;
113+
const
114+
AllocCount = {$IFDEF CPUX64}51{$ELSE}90{$ENDIF};
113115
var
114116
i: integer;
115117
ptr, ptr1, ptr2: Pointer;
@@ -142,7 +144,7 @@ procedure TMethodCallbackTest.TestBug01;
142144

143145
CheckEquals(0, CodeMemPageCount);
144146

145-
for i:=1 to 90 do
147+
for i:=1 to AllocCount do
146148
ptr:=GetCallBack(fTestObj, @TTestObj.ThreeArgCdeclProcedure, 5, ctCdecl);
147149

148150
// there should still be 1 page allocated
@@ -242,6 +244,8 @@ procedure TMethodCallbackTest.TestFourArgStdFunction;
242244
end;
243245

244246
procedure TMethodCallbackTest.TestMemoryMgmt;
247+
const
248+
AllocCount = {$IFDEF CPUX64}101{$ELSE}110{$ENDIF};
245249
var
246250
i: integer;
247251
ptr, ptr1, ptr2: Pointer;
@@ -253,7 +257,7 @@ procedure TMethodCallbackTest.TestMemoryMgmt;
253257

254258
CheckEquals(0, CodeMemPageCount);
255259

256-
for i:=1 to 110 do
260+
for i:=1 to AllocCount do
257261
ptr:=GetCallBack(fTestObj, @TTestObj.ThreeArgCdeclProcedure, 3, ctCdecl);
258262

259263
// there should still be 1 page allocated

0 commit comments

Comments
 (0)