diff options
author | Florian Ragwitz <rafl@debian.org> | 2010-09-02 23:11:26 +0200 |
---|---|---|
committer | Florian Ragwitz <rafl@debian.org> | 2010-09-02 23:51:30 +0200 |
commit | c510e33d30368bc5440f1651f6b31f73d2354eba (patch) | |
tree | 9286faae98a201e6c1a3da345e868f082d142879 /dist/Math-BigInt/t/use_lib2.t | |
parent | 69f857902b1b105d96448597da9c4bc9cd4e90a3 (diff) | |
download | perl-c510e33d30368bc5440f1651f6b31f73d2354eba.tar.gz |
blead is upstream for Math-BigInt
Diffstat (limited to 'dist/Math-BigInt/t/use_lib2.t')
-rw-r--r-- | dist/Math-BigInt/t/use_lib2.t | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/dist/Math-BigInt/t/use_lib2.t b/dist/Math-BigInt/t/use_lib2.t new file mode 100644 index 0000000000..298ff7d0e8 --- /dev/null +++ b/dist/Math-BigInt/t/use_lib2.t @@ -0,0 +1,36 @@ +#!/usr/bin/perl -w + +# see if using Math::BigInt and Math::BigFloat works together nicely. +# all use_lib*.t should be equivalent + +use strict; +use Test; + +BEGIN + { + $| = 1; + # to locate the testing files + my $location = $0; $location =~ s/use_lib2.t//i; + unshift @INC, qw(../lib); # to locate the modules + if (-d 't') + { + chdir 't'; + require File::Spec; + unshift @INC, File::Spec->catdir(File::Spec->updir, $location); + } + else + { + unshift @INC, $location; + } + print "# INC = @INC\n"; + + plan tests => 2; + } + +use Math::BigInt; +use Math::BigFloat lib => 'BareCalc'; + +ok (Math::BigInt->config()->{lib},'Math::BigInt::BareCalc'); + +ok (Math::BigFloat->new(123)->badd(123),246); + |