diff options
Diffstat (limited to 'dist/bignum/t/infnan.inc')
-rw-r--r-- | dist/bignum/t/infnan.inc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/dist/bignum/t/infnan.inc b/dist/bignum/t/infnan.inc index 771b94e748..561adc1a70 100644 --- a/dist/bignum/t/infnan.inc +++ b/dist/bignum/t/infnan.inc @@ -6,30 +6,30 @@ my ($x); ############################################################################### # inf tests -$x = 1+inf; ok (ref($x) =~ /^Math::BigInt/); ok ($x->bstr(),'inf'); -$x = 1*inf; ok (ref($x) =~ /^Math::BigInt/); ok ($x->bstr(),'inf'); +$x = 1+inf; like (ref($x), qr/^Math::BigInt/); is ($x->bstr(),'inf'); +$x = 1*inf; like (ref($x), qr/^Math::BigInt/); is ($x->bstr(),'inf'); # these don't work without exporting inf() -$x = inf; ok (ref($x) =~ /^Math::BigInt/); ok ($x->bstr(),'inf'); -$x = inf+inf; ok (ref($x) =~ /^Math::BigInt/); ok ($x->bstr(),'inf'); -$x = inf*inf; ok (ref($x) =~ /^Math::BigInt/); ok ($x->bstr(),'inf'); +$x = inf; like (ref($x), qr/^Math::BigInt/); is ($x->bstr(),'inf'); +$x = inf+inf; like (ref($x), qr/^Math::BigInt/); is ($x->bstr(),'inf'); +$x = inf*inf; like (ref($x), qr/^Math::BigInt/); is ($x->bstr(),'inf'); ############################################################################### # NaN tests -$x = 1+NaN; ok (ref($x) =~ /^Math::BigInt/); ok ($x->bstr(),'NaN'); -$x = 1*NaN; ok (ref($x) =~ /^Math::BigInt/); ok ($x->bstr(),'NaN'); +$x = 1+NaN; like (ref($x), qr/^Math::BigInt/); is ($x->bstr(),'NaN'); +$x = 1*NaN; like (ref($x), qr/^Math::BigInt/); is ($x->bstr(),'NaN'); # these don't work without exporting NaN() -$x = NaN; ok (ref($x) =~ /^Math::BigInt/); ok ($x->bstr(),'NaN'); -$x = NaN+NaN; ok (ref($x) =~ /^Math::BigInt/); ok ($x->bstr(),'NaN'); -$x = NaN*NaN; ok (ref($x) =~ /^Math::BigInt/); ok ($x->bstr(),'NaN'); +$x = NaN; like (ref($x), qr/^Math::BigInt/); is ($x->bstr(),'NaN'); +$x = NaN+NaN; like (ref($x), qr/^Math::BigInt/); is ($x->bstr(),'NaN'); +$x = NaN*NaN; like (ref($x), qr/^Math::BigInt/); is ($x->bstr(),'NaN'); ############################################################################### # mixed tests # these don't work without exporting NaN() or inf() -$x = NaN+inf; ok (ref($x) =~ /^Math::BigInt/); ok ($x->bstr(),'NaN'); -$x = NaN*inf; ok (ref($x) =~ /^Math::BigInt/); ok ($x->bstr(),'NaN'); -$x = inf*NaN; ok (ref($x) =~ /^Math::BigInt/); ok ($x->bstr(),'NaN'); +$x = NaN+inf; like (ref($x), qr/^Math::BigInt/); is ($x->bstr(),'NaN'); +$x = NaN*inf; like (ref($x), qr/^Math::BigInt/); is ($x->bstr(),'NaN'); +$x = inf*NaN; like (ref($x), qr/^Math::BigInt/); is ($x->bstr(),'NaN'); |