This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Document string- and number-specific bitops in perlop
[perl5.git] / dist / Math-BigInt / t / req_mbfw.t
1 #!/usr/bin/perl -w
2
3 # check that requiring BigFloat and then calling import() works
4
5 use strict;
6 use Test::More tests => 3;
7
8 BEGIN { unshift @INC, 't'; }
9
10 # normal require that calls import automatically (we thus have MBI afterwards)
11 require Math::BigFloat;
12 my $x = Math::BigFloat->new(1); ++$x;
13 is ($x,2, '$x is 2');
14
15 like (Math::BigFloat->config()->{with}, qr/^Math::BigInt::(Fast)?Calc\z/, 'with ignored' );
16
17 # now override
18 Math::BigFloat->import ( with => 'Math::BigInt::Subclass' );
19
20 # the "with" argument is ignored
21 like (Math::BigFloat->config()->{with}, qr/^Math::BigInt::(Fast)?Calc\z/, 'with ignored' );
22
23 # all tests done