Skip to content

Commit db29eb0

Browse files
committed
Remove compiler hints
1 parent 5bd8da5 commit db29eb0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Tests/MethodCallBackTest.pas

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,17 @@ procedure TMethodCallbackTest.TestBug01;
155155
Assert.AreEqual(0, CodeMemPageCount);
156156

157157
for i:=1 to AllocCount do
158+
begin
158159
ptr:=GetCallBack(fTestObj, @TTestObj.ThreeArgCdeclProcedure, 5, ctCdecl);
160+
Assert.IsTrue(ptr <> nil);
161+
end;
159162

160163
// there should still be 1 page allocated
161164
Assert.AreEqual(1, CodeMemPageCount);
162165

163166
// get one callback more and we should have 2 pages
164167
ptr:=GetCallBack(fTestObj, @TTestObj.ThreeArgCdeclProcedure, 5, ctCdecl);
168+
Assert.IsTrue(ptr <> nil);
165169
// getting CodeMemPageCount would crash as the next page pointer was overwritten by the
166170
// last allocation
167171
Assert.AreEqual(2, CodeMemPageCount);
@@ -271,7 +275,10 @@ procedure TMethodCallbackTest.TestMemoryMgmt;
271275
Assert.AreEqual(0, CodeMemPageCount);
272276

273277
for i:=1 to AllocCount do
278+
begin
274279
ptr:=GetCallBack(fTestObj, @TTestObj.ThreeArgCdeclProcedure, 3, ctCdecl);
280+
Assert.IsTrue(ptr <> nil);
281+
end;
275282

276283
// there should still be 1 page allocated
277284
Assert.AreEqual(1, CodeMemPageCount);
@@ -297,6 +304,7 @@ procedure TMethodCallbackTest.TestMemoryMgmt;
297304

298305
// allocate one more and page count should go up to 2 again
299306
ptr:=GetCallBack(fTestObj, @TTestObj.ThreeArgCdeclProcedure, 3, ctCdecl);
307+
Assert.IsTrue(ptr <> nil);
300308
Assert.AreEqual(2, CodeMemPageCount);
301309
end;
302310

0 commit comments

Comments
 (0)