Commit | Line | Data |
b3abae2a |
1 | #!/usr/bin/perl -w |
2 | |
3 | use strict; |
4 | use Test; |
5 | |
6 | BEGIN |
7 | { |
8 | $| = 1; |
9 | chdir 't' if -d 't'; |
10 | unshift @INC, '../lib'; # for running manually |
11 | plan tests => 10; |
12 | } |
13 | |
14 | # test whether Math::BigInt constant works |
15 | |
16 | use Math::BigInt; |
17 | |
18 | ok (Math::BigInt->can('config')); |
19 | |
20 | my $cfg = Math::BigInt->config(); |
21 | |
22 | ok (ref($cfg),'HASH'); |
23 | |
24 | ok ($cfg->{lib},'Math::BigInt::Calc'); |
8f675a64 |
25 | ok ($cfg->{lib_version}, $Math::BigInt::Calc::VERSION); |
b3abae2a |
26 | ok ($cfg->{class},'Math::BigInt'); |
27 | ok ($cfg->{upgrade}||'',''); |
28 | ok ($cfg->{div_scale},40); |
29 | |
30 | ok ($cfg->{precision}||0,0); # should test for undef |
31 | ok ($cfg->{accuracy}||0,0); |
32 | |
33 | ok ($cfg->{round_mode},'even'); |
34 | |
35 | # all tests done |
36 | |