This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8c9a75
)
Yet another way to say Infinity: HP-UX calls its "++".
author
Jarkko Hietaniemi
<jhi@iki.fi>
Mon, 6 Aug 2001 15:02:48 +0000
(15:02 +0000)
committer
Jarkko Hietaniemi
<jhi@iki.fi>
Mon, 6 Aug 2001 15:02:48 +0000
(15:02 +0000)
p4raw-id: //depot/perl@11598
lib/Math/BigInt/t/bigintpm.t
patch
|
blob
|
blame
|
history
diff --git
a/lib/Math/BigInt/t/bigintpm.t
b/lib/Math/BigInt/t/bigintpm.t
index
4b28f0b
..
e456a3e
100755
(executable)
--- a/
lib/Math/BigInt/t/bigintpm.t
+++ b/
lib/Math/BigInt/t/bigintpm.t
@@
-531,11
+531,15
@@
$x = Math::BigInt->new('+inf'); ok_inf ($x,$y);
# libc are confused what to call Infinity
+sub fix_inf {
+ $_[0] =~ s/^(inf(?:inity)?|\+\+)$/Inf/i; # HP-UX calls it "++"
+}
+
sub ok_inf {
my ($x, $y) = @_;
-
$x =~ s/^inf(?:inity)?/Inf/i
;
-
$y =~ s/^inf(?:inity)?/Inf/i
;
+
fix_inf($x)
;
+
fix_inf($y)
;
ok($x, $y);
}