Upgrade to Math::BigInt 1.53.
[p5sagit/p5-mst-13.2.git] / lib / Math / BigInt / t / upgrade.t
1 #!/usr/bin/perl -w
2
3 use Test;
4 use strict;
5
6 BEGIN
7   {
8   $| = 1;
9   # to locate the testing files
10   my $location = $0; $location =~ s/upgrade.t//i;
11   if ($ENV{PERL_CORE})
12     {
13     @INC = qw(../t/lib);                # testing with the core distribution
14     }
15   unshift @INC, '../lib';       # for testing manually
16   if (-d 't')
17     {
18     chdir 't';
19     require File::Spec;
20     unshift @INC, File::Spec->catdir(File::Spec->updir, $location);
21     }
22   else
23     {
24     unshift @INC, $location;
25     }
26   print "# INC = @INC\n";
27
28    plan tests => 1990
29     + 2;                        # our own tests
30   }
31
32 use Math::BigInt upgrade => 'Math::BigFloat';
33 use Math::BigFloat;
34
35 use vars qw ($scale $class $try $x $y $f @args $ans $ans1 $ans1_str $setup
36              $ECL $CL);
37 $class = "Math::BigInt";
38 $CL = "Math::BigInt::Calc";
39 $ECL = "Math::BigFloat";
40
41 ok (Math::BigInt->upgrade(),'Math::BigFloat');
42 ok (Math::BigInt->downgrade()||'','');
43
44 require 'upgrade.inc';  # all tests here for sharing