From c525946d6533f3d951b57391ea1d735971287550 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Sun, 5 Aug 2001 23:10:52 +0000 Subject: [PATCH] libcs are confused what to call Infinity. p4raw-id: //depot/perl@11593 --- lib/Math/BigInt/t/bigintpm.t | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 -- 2.7.4