diff options
Diffstat (limited to 'cpan/bignum/t/option_a.t')
-rw-r--r-- | cpan/bignum/t/option_a.t | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/cpan/bignum/t/option_a.t b/cpan/bignum/t/option_a.t index 2a9d17154d..6cd02268e1 100644 --- a/cpan/bignum/t/option_a.t +++ b/cpan/bignum/t/option_a.t @@ -1,22 +1,36 @@ -#!perl - -############################################################################### +# -*- mode: perl; -*- use strict; use warnings; -use Test::More tests => 4; +use Test::More tests => 6; + +{ + my $class = "Math::BigInt"; + + use bigint a => "12"; + cmp_ok($class -> accuracy(), "==", 12, "$class accuracy = 12"); -use bignum a => '12'; + bigint -> import(accuracy => "23"); + cmp_ok($class -> accuracy(), "==", 23, "$class accuracy = 23"); +} + +{ + my $class = "Math::BigFloat"; -my @CLASSES = qw/Math::BigInt Math::BigFloat/; + use bignum a => "12"; + cmp_ok($class -> accuracy(), "==", 12, "$class accuracy = 12"); -foreach my $class (@CLASSES) { - is($class->accuracy(),12, "$class accuracy = 12"); + bignum -> import(accuracy => "23"); + cmp_ok($class -> accuracy(), "==", 23, "$class accuracy = 23"); } -bignum->import(accuracy => '23'); +{ + my $class = "Math::BigRat"; + + use bigrat a => "12"; + cmp_ok($class -> accuracy(), "==", 12, "$class accuracy = 12"); -foreach my $class (@CLASSES) { - is($class->accuracy(), 23, "$class accuracy = 23"); + bigrat -> import(accuracy => "23"); + cmp_ok($class -> accuracy(), "==", 23, "$class accuracy = 23"); } |