mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-15 12:29:32 +02:00
* tests fixed after last commit
This commit is contained in:
parent
55f0103248
commit
e19b45a71b
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user