# 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;
# 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);