This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Math::BigInt 1.51.
[perl5.git] / lib / Math / BigInt / t / config.t
CommitLineData
b3abae2a
JH
1#!/usr/bin/perl -w
2
3use strict;
4use Test;
5
6BEGIN
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
16use Math::BigInt;
17
18ok (Math::BigInt->can('config'));
19
20my $cfg = Math::BigInt->config();
21
22ok (ref($cfg),'HASH');
23
24ok ($cfg->{lib},'Math::BigInt::Calc');
25ok ($cfg->{lib_version},'0.22');
26ok ($cfg->{class},'Math::BigInt');
27ok ($cfg->{upgrade}||'','');
28ok ($cfg->{div_scale},40);
29
30ok ($cfg->{precision}||0,0); # should test for undef
31ok ($cfg->{accuracy}||0,0);
32
33ok ($cfg->{round_mode},'even');
34
35# all tests done
36