Commit | Line | Data |
---|---|---|
56b9c951 JH |
1 | #!/usr/bin/perl -w |
2 | ||
3 | # see if using Math::BigInt and Math::BigFloat works together nicely. | |
4 | # all use_lib*.t should be equivalent | |
5 | ||
6 | use strict; | |
7 | use Test; | |
8 | ||
9 | BEGIN | |
10 | { | |
11 | $| = 1; | |
8f675a64 JH |
12 | # to locate the testing files |
13 | my $location = $0; $location =~ s/use_lib1.t//i; | |
14 | if ($ENV{PERL_CORE}) | |
15 | { | |
16 | # testing with the core distribution | |
17 | @INC = qw(../t/lib); | |
18 | } | |
19 | unshift @INC, qw(../lib); # to locate the modules | |
20 | if (-d 't') | |
21 | { | |
22 | chdir 't'; | |
23 | require File::Spec; | |
24 | unshift @INC, File::Spec->catdir(File::Spec->updir, $location); | |
25 | } | |
26 | else | |
27 | { | |
28 | unshift @INC, $location; | |
29 | } | |
56b9c951 | 30 | print "# INC = @INC\n"; |
8f675a64 | 31 | |
56b9c951 JH |
32 | plan tests => 2; |
33 | } | |
34 | ||
35 | use Math::BigFloat lib => 'BareCalc'; | |
36 | ||
37 | ok (Math::BigInt->config()->{lib},'Math::BigInt::BareCalc'); | |
38 | ||
39 | ok (Math::BigFloat->new(123)->badd(123),246); | |
40 |