From: Jarkko Hietaniemi Date: Sun, 5 Aug 2001 23:10:52 +0000 (+0000) Subject: libcs are confused what to call Infinity. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c525946d6533f3d951b57391ea1d735971287550;p=p5sagit%2Fp5-mst-13.2.git libcs are confused what to call Infinity. p4raw-id: //depot/perl@11593 --- diff --git a/lib/Math/BigInt/t/bigintpm.t b/lib/Math/BigInt/t/bigintpm.t index 9e84e20..b48f223 100755 --- a/lib/Math/BigInt/t/bigintpm.t +++ b/lib/Math/BigInt/t/bigintpm.t @@ -522,12 +522,24 @@ ok (ref($x),'Math::Foo'); # test whether +inf eq inf $y = 1e1000000; # create inf, since bareword inf does not work -$x = Math::BigInt->new('+inf'); ok ($x,$y); +$x = Math::BigInt->new('+inf'); ok_inf ($x,$y); ############################################################################### # all tests done ############################################################################### + +# libc are confused what to call Infinity + +sub ok_inf { + my ($x, $y) = @_; + + $x =~ s/^inf(?:inity)?/$1/i; + $y =~ s/^inf(?:inity)?/$1/i; + + ok($x, $y); +} + # Perl 5.005 does not like ok ($x,undef) sub ok_undef