Test tweak from Craig Berry.
[p5sagit/p5-mst-13.2.git] / lib / Math / BigInt / t / upgrade.t
CommitLineData
b3abae2a 1#!/usr/bin/perl -w
2
3use Test;
4use strict;
5
6BEGIN
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
28df3e88 28 plan tests => 1990
29 + 2; # our own tests
b3abae2a 30 }
31
32use Math::BigInt upgrade => 'Math::BigFloat';
33use Math::BigFloat;
34
35use 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
41ok (Math::BigInt->upgrade(),'Math::BigFloat');
28df3e88 42ok (Math::BigInt->downgrade()||'','');
b3abae2a 43
44require 'upgrade.inc'; # all tests here for sharing