florian 25 éve
szülő
commit
ba185a02c5
1 módosított fájl, 20 hozzáadás és 3 törlés
  1. 20 3
      tests/test/tint642.pp

+ 20 - 3
tests/test/tint642.pp

@@ -723,6 +723,7 @@ procedure teststringqword;
      s : string;
      s : string;
      l : longint;
      l : longint;
      a : ansistring;
      a : ansistring;
+     code : integer;
 
 
   begin
   begin
      { testing str: shortstring }
      { testing str: shortstring }
@@ -776,8 +777,24 @@ procedure teststringqword;
      if a<>'1234000054321' then
      if a<>'1234000054321' then
        do_error(2207);
        do_error(2207);
 
 
-     { testing val }
-     { !!!!!!!     }
+     { testing val for qword }
+     assignqword($ffffffff,$ffffffff,q1);
+     s:='18446744073709551615';
+     a:=s;
+     val(s,q2,code);
+     if code<>0 then
+       do_error(2208);
+     if q1<>q2 then
+       do_error(2209);
+     val(a,q2,code);
+     if code<>0 then
+       do_error(2210);
+     if q1<>q2 then
+       do_error(2211);
+     s:='18446744073709551616';
+     val(s,q2,code);
+     if code=0 then
+       do_error(2212);
   end;
   end;
 
 
 procedure testmodqword;
 procedure testmodqword;
@@ -1187,4 +1204,4 @@ begin
    writeln('                Int64 test successful');
    writeln('                Int64 test successful');
    writeln('------------------------------------------------------');
    writeln('------------------------------------------------------');
    halt(0);
    halt(0);
-end.
+end.