This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[PATCH] Math::BigInt v1.73 final
[perl5.git] / lib / Math / BigRat / t / bigratup.t
index 99c4dc3..8b17a31 100644 (file)
@@ -1,8 +1,8 @@
 #!/usr/bin/perl -w
 
-# Test whether $Math::BigInt::upgrade is breaks out neck
+# Test whether $Math::BigInt::upgrade breaks our neck
 
-use Test;
+use Test::More;
 use strict;
 
 BEGIN
@@ -22,17 +22,19 @@ my ($x,$y,$z);
 ##############################################################################
 # bceil/bfloor
 
-$x = $rat->new('49/4'); ok ($x->bfloor(),'12');
-$x = $rat->new('49/4'); ok ($x->bceil(),'13');
+$x = $rat->new('49/4'); is ($x->bfloor(),'12', 'floor(49/4)');
+$x = $rat->new('49/4'); is ($x->bceil(),'13', 'ceil(49/4)');
 
 ##############################################################################
 # bsqrt
 
-$x = $rat->new('144'); ok ($x->bsqrt(),'12');
-$x = $rat->new('144/16'); ok ($x->bsqrt(),'3');
-$x = $rat->new('1/3'); ok ($x->bsqrt(),
- '1000000000000000000000000000000000000000/1732050807568877293527446341505872366943');
-
+$x = $rat->new('144'); is ($x->bsqrt(),'12', 'bsqrt(144)');
+$x = $rat->new('144/16'); is ($x->bsqrt(),'3', 'bsqrt(144/16)');
+$x = $rat->new('1/3'); is ($x->bsqrt(),
+ '1000000000000000000000000000000000000000/1732050807568877293527446341505872366943',
+ 'bsqrt(1/3)');
 
+# all tests successfull
 
+1;