Browse Source

* tests fixed after last commit

florian 3 years ago
parent
commit
e19b45a71b
3 changed files with 8 additions and 44 deletions
  1. 4 4
      tests/tbs/tb0336.pp
  2. 3 39
      tests/test/units/system/tval5.pp
  3. 1 1
      tests/webtbs/tw15633.pp

+ 4 - 4
tests/tbs/tb0336.pp

@@ -20,27 +20,27 @@ begin
    val(s,d,code);
    if code<>0 then
      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';
    val(s,l,code);
    if code<>0 then
      do_error(3);
+
    s:='2147483648';
    val(s,l,code);
    if code=0 then
      do_error(4);
+
    s:='-2147483648';
    val(s,l,code);
    if code<>0 then
      do_error(5);
+     
    s:='-2147483649';
    val(s,l,code);
    if code=0 then

+ 3 - 39
tests/test/units/system/tval5.pp

@@ -44,20 +44,8 @@ begin
       for b := low(hexch) to high(hexch) do
         begin
           s[length(s)]:=hexch[b];
-{$ifdef cpu64}
-{$r+}
-          try
-            caught:=false;
-{$endif cpu64}
-            val(s,c,l);
-{$ifdef cpu64}
-          except on e : exception do
-            caught:=true;
-          end;
-          if not caught then
-{$else cpu64}
+          val(s,c,l);
           if (l=0) then
-{$endif}
             halt(b2+32+h);
         end;
     end;
@@ -84,20 +72,8 @@ begin
   for ch := '6' to '9' do
     begin
       s[length(s)]:=ch;
-{$ifdef cpu64}
-{$r+}
-      try
-        caught:=false;
-{$endif cpu64}
-          val(s,c,l);
-{$ifdef cpu64}
-      except on e : exception do
-        caught:=true;
-      end;
-      if not caught then
-{$else cpu64}
+      val(s,c,l);
       if (l=0) then
-{$endif cpu64}
         halt(ord(ch)-ord('0')+b+54+h);
     end;
 
@@ -109,20 +85,8 @@ begin
       for ch := '0' to '9' do
         begin
           s[length(s)]:=ch;
-{$ifdef cpu64}
-{$r+}
-          try
-            caught:=false;
-{$endif cpu64}
-            val(s,c,l);
-{$ifdef cpu64}
-          except on e : exception do
-            caught:=true;
-          end;
-          if not caught then
-{$else cpu64}
+          val(s,c,l);
           if (l=0) then
-{$endif cpu64}
             halt(ord(ch2)-ord('1')+65+h);
         end;
     end;

+ 1 - 1
tests/webtbs/tw15633.pp

@@ -4,6 +4,6 @@ var value : word;
 begin
   Val('4294901772', Value, code);
   writeln(code);
-  if code<>10 then
+  if code<>6 then
     halt(1);
 end.