Browse Source

* on 64 bit CPUs val works with 64 bit

florian 20 years ago
parent
commit
5f8c31df7c
1 changed files with 12 additions and 0 deletions
  1. 12 0
      tests/tbs/tb0336.pp

+ 12 - 0
tests/tbs/tb0336.pp

@@ -18,7 +18,11 @@ begin
      do_error(1);
      do_error(1);
    s:='4294967296';
    s:='4294967296';
    val(s,d,code);
    val(s,d,code);
+{$ifdef CPU64}
+   if code<>0 then
+{$else CPU64}
    if code=0 then
    if code=0 then
+{$endif CPU64}
      do_error(1);
      do_error(1);
 
 
    s:='2147483647';
    s:='2147483647';
@@ -27,7 +31,11 @@ begin
      do_error(3);
      do_error(3);
    s:='2147483648';
    s:='2147483648';
    val(s,l,code);
    val(s,l,code);
+{$ifdef CPU64}
+   if code<>0 then
+{$else CPU64}
    if code=0 then
    if code=0 then
+{$endif CPU64}
      do_error(4);
      do_error(4);
    s:='-2147483648';
    s:='-2147483648';
    val(s,l,code);
    val(s,l,code);
@@ -35,6 +43,10 @@ begin
      do_error(5);
      do_error(5);
    s:='-2147483649';
    s:='-2147483649';
    val(s,l,code);
    val(s,l,code);
+{$ifdef CPU64}
+   if code<>0 then
+{$else CPU64}
    if code=0 then
    if code=0 then
+{$endif CPU64}
      do_error(6);
      do_error(6);
 end.
 end.