diff options
Diffstat (limited to 'cpan/Math-BigRat/t/big_ap.t')
-rw-r--r-- | cpan/Math-BigRat/t/big_ap.t | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/cpan/Math-BigRat/t/big_ap.t b/cpan/Math-BigRat/t/big_ap.t index 8e261f61a4..39a2f7185b 100644 --- a/cpan/Math-BigRat/t/big_ap.t +++ b/cpan/Math-BigRat/t/big_ap.t @@ -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); |