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