This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Sync bignum with CPAN version 0.51
[perl5.git] / cpan / bignum / t / ratopt_a.t
1 #!perl
2
3 ###############################################################################
4
5 use strict;
6 use warnings;
7
8 use Test::More tests => 7;
9
10 my @CLASSES = qw/Math::BigInt Math::BigFloat Math::BigRat/;
11
12 # bigrat (bug until v0.15)
13 use bigrat a => 2;
14
15 foreach my $class (@CLASSES) {
16     is($class->accuracy(), 2, "$class accuracy = 2");
17 }
18
19 eval { bigrat->import(accuracy => '42') };
20
21 is($@, '', 'no error');
22
23 foreach my $class (@CLASSES) {
24     is($class->accuracy(), 42, "$class accuracy = 42");
25 }