mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-03 13:30:55 +02:00
* test also with FASTMATH on and adapt for tests not supposed to work (they include the use of NaN)
This commit is contained in:
parent
1ed23e5472
commit
14dbb7cb76
@ -146,6 +146,7 @@ procedure TestSingle;
|
||||
TestFail(37);
|
||||
if Max4(v1,v3)<>v3 then
|
||||
TestFail(38);
|
||||
{$ifndef USE_FASTMATH}
|
||||
SetExceptionMask([exInvalidOp]);
|
||||
vNaN:=NaN;
|
||||
if not(IsNaN(Min1(v1,vNaN))) then
|
||||
@ -181,6 +182,7 @@ procedure TestSingle;
|
||||
if Max4(vNaN,v3)<>v3 then
|
||||
TestFail(56);
|
||||
SetExceptionMask([]);
|
||||
{$endif USE_FASTMATH}
|
||||
end;
|
||||
|
||||
procedure TestDouble;
|
||||
@ -322,6 +324,7 @@ procedure TestDouble;
|
||||
TestFail(137);
|
||||
if Max4(v1,v3)<>v3 then
|
||||
TestFail(138);
|
||||
{$ifndef USE_FASTMATH}
|
||||
SetExceptionMask([exInvalidOp]);
|
||||
vNaN:=NaN;
|
||||
if not(IsNaN(Min1(v1,vNaN))) then
|
||||
@ -357,6 +360,7 @@ procedure TestDouble;
|
||||
if Max4(vNaN,v3)<>v3 then
|
||||
TestFail(156);
|
||||
SetExceptionMask([]);
|
||||
{$endif USE_FASTMATH}
|
||||
end;
|
||||
|
||||
|
||||
|
5
tests/test/tminmax3.pp
Normal file
5
tests/test/tminmax3.pp
Normal file
@ -0,0 +1,5 @@
|
||||
{ %opt=-O- -O3 -Oofastmath } { use fast math ... }
|
||||
{$define USE_FASTMATH} { ... so skip NaN tests }
|
||||
{$mode objfpc}
|
||||
|
||||
{$I minmax.inc }
|
Loading…
Reference in New Issue
Block a user