mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 16:49:20 +02:00
* test fails now if it causes an exception
git-svn-id: trunk@39624 -
This commit is contained in:
parent
ea32ddd5b2
commit
9e9c2c02ed
@ -13,14 +13,23 @@ begin
|
|||||||
x := intpower(d,-314);
|
x := intpower(d,-314);
|
||||||
writeln('10^(-314) = ',x); //should be 1e-315
|
writeln('10^(-314) = ',x); //should be 1e-315
|
||||||
except
|
except
|
||||||
on E: Exception do writeln('10^(-314) (should be 1e-314): ', E.Message);
|
on E: Exception do
|
||||||
|
begin
|
||||||
|
writeln('10^(-314) (should be 1e-314): ', E.Message);
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
try
|
try
|
||||||
d := 2;
|
d := 2;
|
||||||
x := intpower(d,-2000);
|
x := intpower(d,-2000);
|
||||||
writeln('2^(-2000) = ',x); //should be 0
|
writeln('2^(-2000) = ',x); //should be 0
|
||||||
except
|
except
|
||||||
on E: Exception do writeln(' 0.5^2000 (should be 0) : ', E.Message);
|
on E: Exception do
|
||||||
|
begin
|
||||||
|
writeln(' 0.5^2000 (should be 0) : ', E.Message);
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
writeln('ok');
|
||||||
{$endif FPC_HAS_TYPE_DOUBLE}
|
{$endif FPC_HAS_TYPE_DOUBLE}
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user