1#!perl 2 3############################################################################### 4 5use strict; 6use warnings; 7 8use Test::More tests => 7; 9 10my @CLASSES = qw/Math::BigInt Math::BigFloat Math::BigRat/; 11 12# bigrat (bug until v0.15) 13use bigrat a => 2; 14 15foreach my $class (@CLASSES) { 16 is($class->accuracy(), 2, "$class accuracy = 2"); 17} 18 19eval { bigrat->import(accuracy => '42') }; 20 21is($@, '', 'no error'); 22 23foreach my $class (@CLASSES) { 24 is($class->accuracy(), 42, "$class accuracy = 42"); 25} 26