This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade Math::BigRat from version 0.25 to 0.26
[perl5.git] / cpan / Math-BigRat / t / big_ap.t
index 8e261f6..39a2f71 100644 (file)
@@ -3,16 +3,8 @@
 # Test that accuracy() and precision() in BigInt/BigFloat do not disturb
 # the rounding force in BigRat.
 
-use Test;
 use strict;
-
-BEGIN
-  {
-  $| = 1;
-  chdir 't' if -d 't';
-  unshift @INC, '../lib';
-  plan tests => 17;
-  }
+use Test::More tests => 17;
 
 use Math::BigInt;
 use Math::BigFloat;
@@ -37,67 +29,67 @@ my ($x,$y,$z);
 # new()
 
 $z = $r->new('12345678901234567890/2');
-ok ($z,$proper);
+is ($z,$proper);
 
 $z = $r->new('1234567890123456789E1');
-ok ($z,$proper2);
+is ($z,$proper2);
 
 $z = $r->new('12345678901234567890/1E0');
-ok ($z,$proper2);
+is ($z,$proper2);
 $z = $r->new('1234567890123456789e1/1');
-ok ($z,$proper2);
+is ($z,$proper2);
 $z = $r->new('1234567890123456789e1/1E0');
-ok ($z,$proper2);
+is ($z,$proper2);
 
 $z = $r->new($proper_int);
-ok ($z,$proper2);
+is ($z,$proper2);
 
 $z = $r->new($proper_float);
-ok ($z,$proper2);
+is ($z,$proper2);
 
 ##############################################################################
 # bdiv
 
 $x = $r->new('12345678901234567890'); $y = Math::BigRat->new('2');
 $z = $x->copy->bdiv($y);
-ok ($z,$proper);
+is ($z,$proper);
 
 ##############################################################################
 # bmul
 
 $x = $r->new("$proper"); $y = Math::BigRat->new('1');
 $z = $x->copy->bmul($y);
-ok ($z,$proper);
+is ($z,$proper);
 $z = $r->new('12345678901234567890/1E0');
-ok ($z,$proper2);
+is ($z,$proper2);
 
 $z = $r->new($proper_int);
-ok ($z,$proper2);
+is ($z,$proper2);
 
 $z = $r->new($proper_float);
-ok ($z,$proper2);
+is ($z,$proper2);
 
 ##############################################################################
 # bdiv
 
 $x = $r->new('12345678901234567890'); $y = Math::BigRat->new('2');
 $z = $x->copy->bdiv($y);
-ok ($z,$proper);
+is ($z,$proper);
 
 ##############################################################################
 # bmul
 
 $x = $r->new("$proper"); $y = Math::BigRat->new('1');
 $z = $x->copy->bmul($y);
-ok ($z,$proper);
+is ($z,$proper);
 
 $x = $r->new("$proper"); $y = Math::BigRat->new('2');
 $z = $x->copy->bmul($y);
-ok ($z,$proper2);
+is ($z,$proper2);
 
 ##############################################################################
 # binc/bdec
 
-$x = $proper->copy()->binc(); ok ($x,$proper_inc);
-$x = $proper->copy()->bdec(); ok ($x,$proper_dec);
+$x = $proper->copy()->binc(); is ($x,$proper_inc);
+$x = $proper->copy()->bdec(); is ($x,$proper_dec);