From: John E. Malmberg Date: Sat, 20 Aug 2005 23:21:44 +0000 (-0400) Subject: [patch@25305] t/op/arith.t fix for VMS with IEEE float X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6332ff5c9e0b0897076b0fe0ab26612d7472c90a;p=p5sagit%2Fp5-mst-13.2.git [patch@25305] t/op/arith.t fix for VMS with IEEE float From: "John E. Malmberg" Message-ID: <4307F348.70603@qsl.net> Date: Sat, 20 Aug 2005 23:21:44 -0400 p4raw-id: //depot/perl@25311 --- diff --git a/t/op/arith.t b/t/op/arith.t index 183ebf3..58c1f75 100755 --- a/t/op/arith.t +++ b/t/op/arith.t @@ -289,18 +289,22 @@ tryeq_sloppy $T++, 18446744073709551616/9223372036854775808, 2; try $T++, abs($t1000 -1000 * $t) <= 2000; } -if ($^O eq 'vos') { - print "not ok ", $T++, " # TODO VOS raises SIGFPE instead of producing infinity.\n"; -} -elsif ($^O eq 'VMS') { +my $vms_no_ieee; +if ($^O eq 'VMS') { use vars '%Config'; eval {require Config; import Config}; - print $T++, " # SKIP -- the IEEE infinity model is unavailable in this configuration.\n" - unless defined($Config{useieee}); -} + $vms_no_ieee = 1 unless defined($Config{useieee}); +} + +if ($^O eq 'vos') { + print "not ok ", $T++, " # TODO VOS raises SIGFPE instead of producing infinity.\n"; +} +elsif ($vms_no_ieee) { + print $T++, " # SKIP -- the IEEE infinity model is unavailable in this configuration.\n" +} elsif ($^O eq 'ultrix') { print "not ok ", $T++, " # TODO Ultrix enters deep nirvana instead of producing infinity.\n"; -} +} else { # The computation of $v should overflow and produce "infinity" # on any system whose max exponent is less than 10**1506.