Browse Source

* 64 bit fixes

peter 21 years ago
parent
commit
0f3fbdf989
2 changed files with 9 additions and 6 deletions
  1. 8 5
      tests/test/talign2.pp
  2. 1 1
      tests/test/tclass5.pp

+ 8 - 5
tests/test/talign2.pp

@@ -46,19 +46,22 @@ begin
   test(length(shortstr)=18);
   test(length(shortstr)=18);
   { verify if the address are correctly aligned! }
   { verify if the address are correctly aligned! }
   pt:=@shortstr;
   pt:=@shortstr;
-  test((cardinal(pt) mod sizeof(pointer))=0);
+  test((ptruint(pt) mod sizeof(pointer))=0);
   pt:=p;
   pt:=p;
-  test((cardinal(pt) mod sizeof(pointer))=0);
+  test((ptruint(pt) mod sizeof(pointer))=0);
   pt:=pchar(ansistr);
   pt:=pchar(ansistr);
-  test((cardinal(pt) mod sizeof(pointer))=0);
+  test((ptruint(pt) mod sizeof(pointer))=0);
 {$ifdef haswidestring}
 {$ifdef haswidestring}
   pt:=pchar(widestr);
   pt:=pchar(widestr);
-  test((cardinal(pt) mod sizeof(pointer))=0);
+  test((ptruint(pt) mod sizeof(pointer))=0);
 {$endif}
 {$endif}
 end.  
 end.  
 {
 {
    $Log$
    $Log$
-   Revision 1.2  2002-11-09 21:19:21  carl
+   Revision 1.3  2004-04-29 21:04:58  peter
+     * 64 bit fixes
+
+   Revision 1.2  2002/11/09 21:19:21  carl
      * now check address of tc's also and give error.
      * now check address of tc's also and give error.
      + 1.1 only
      + 1.1 only
 
 

+ 1 - 1
tests/test/tclass5.pp

@@ -68,7 +68,7 @@ program test_fail;
      writeln('Call to ta1.test after successful init');
      writeln('Call to ta1.test after successful init');
      ta1.test;
      ta1.test;
      ta2:=tarraycla.create(true);
      ta2:=tarraycla.create(true);
-     writeln('ta2 = ',longint(ta2),' after unsuccessful init');
+     writeln('ta2 = ',ptrint(ta2),' after unsuccessful init');
      Writeln('Trying to call ta2.test (should generate a Run Time Error)');
      Writeln('Trying to call ta2.test (should generate a Run Time Error)');
      ta2.test;
      ta2.test;
   end.
   end.