* tests fixed after last commit

This commit is contained in:
florian 2022-01-15 22:30:25 +01:00
parent 55f0103248
commit e19b45a71b
3 changed files with 8 additions and 44 deletions

View File

@ -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

View File

@ -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;

View File

@ -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.