瀏覽代碼

* on 64 bit CPUs val works with 64 bit

florian 20 年之前
父節點
當前提交
5f8c31df7c
共有 1 個文件被更改,包括 12 次插入0 次删除
  1. 12 0
      tests/tbs/tb0336.pp

+ 12 - 0
tests/tbs/tb0336.pp

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