develooper Front page | perl.vmsperl | Postings from June 2002

[PATCH perl@17014] t/op/arith.t -- don't test infinity if itdoesn't exist

Thread Next
From:
Craig A. Berry
Date:
June 5, 2002 15:28
Subject:
[PATCH perl@17014] t/op/arith.t -- don't test infinity if itdoesn't exist
Message ID:
5.1.1.5.0.20020605171901.021cb8b8@exchi01
For VMS, all VAX builds and any configurations on Alpha that have not taken 
the default IEEE floating point format will not have its infinity/NaN 
features.  The patch below make arith.t aware of that.  Similar problems 
exist in pack.t but I have not yet addressed those.

--- t/op/arith.t;-0     Sat Jun  1 12:03:16 2002
+++ t/op/arith.t        Wed Jun  5 17:05:27 2002
@@ -5,6 +5,8 @@
     @INC = '../lib';
 }
 
+use Config;
+
 print "1..134\n";
 
 sub try ($$) {
@@ -277,7 +279,11 @@
 
 if ($^O eq 'vos') {
   print "not ok 134 # TODO VOS raises SIGFPE instead of producing infinity.\n";
-} else {
+} 
+elsif (($^O eq 'VMS') && !defined($Config{useieee})) {
+  print "ok 134 # SKIP -- the IEEE infinity model is unavailable in this configuration.\n";
+} 
+else {
   # The computation of $v should overflow and produce "infinity"
   # on any system whose max exponent is less than 10**1506.
   # The exact string used to represent infinity varies by OS,
[end of patch]


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About