2
0
Эх сурвалжийг харах

* fixed test for 64 bit targets

florian 21 жил өмнө
parent
commit
1f27348599

+ 6 - 3
tests/test/cg/tderef.pp

@@ -45,12 +45,12 @@ Begin
  if pl^ <> $F0F0 then
    passed := false;
  FillChar(parray^,sizeof(ttestarray),0);
- ptr:=pbyte((longint(parray)+32));
+ ptr:=pbyte((ptrint(parray)+32));
  ptr^ := $A0;
  if parray^[33] <> $A0 then
    passed := false;
  { left : LOC_REGISTER }
- b:=(pbyte((longint(parray)+32))^);
+ b:=(pbyte((ptrint(parray)+32))^);
  if b <> $A0 then
   passed := false;
  dispose(pl);
@@ -63,7 +63,10 @@ end.
 
 {
    $Log$
-   Revision 1.4  2002-09-07 15:40:56  peter
+   Revision 1.5  2004-11-02 15:58:30  florian
+     * fixed test for 64 bit targets
+
+   Revision 1.4  2002/09/07 15:40:56  peter
      * old logs removed and tabs fixed
 
    Revision 1.3  2002/04/13 21:04:46  carl

+ 2 - 2
tests/test/tstring6.pp

@@ -34,7 +34,7 @@ begin
   {$if defined(ver1_0) or defined(ver1_9_4)}
       Writeln (' (Ref: ',Plongint(Longint(P)-4)^,',Len: ',PLongint(Longint(P)-8)^,')');
   {$else}
-      Writeln (' (Ref: ',Plongint(Longint(P)-8)^,',Len: ',PLongint(Longint(P)-4)^,')');
+      Writeln (' (Ref: ',PSizeInt(PtrInt(P)-sizeof(SizeInt)*2)^,',Len: ',PSizeInt(PtrInt(P)-sizeof(SizeInt))^,')');
   {$endif}
 {$else}
       Writeln (' (Ref: ',Plongint(Longint(P)-8)^,',Len: ',PLongint(Longint(P)-4)^ div sizeof(WideChar),')');
@@ -497,4 +497,4 @@ begin
   TestStdfunc;
   Write ('End of standard functions: ');DoMem(StartMem);
   Write ('For the whole program ');DoMem(GlobalStartMem);
-end.
+end.