diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-24 04:07:39 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-24 04:07:39 +0000 |
commit | edea50ec06f651303560542ed76f678a723a191d (patch) | |
tree | 84fb3026bc321256da61a9c21a92e2aaae533a2c /lib/Math | |
parent | 357cef769dfbba504c1836ae3e0e042c91075e8a (diff) | |
download | perl-edea50ec06f651303560542ed76f678a723a191d.tar.gz |
Move the MBF/MBI test modules to t/lib.
p4raw-id: //depot/perl@13230
Diffstat (limited to 'lib/Math')
-rw-r--r-- | lib/Math/BigInt/t/Math/BigFloat/Subclass.pm | 37 | ||||
-rw-r--r-- | lib/Math/BigInt/t/Math/BigInt/Subclass.pm | 56 | ||||
-rwxr-xr-x | lib/Math/BigInt/t/sub_mbf.t | 2 | ||||
-rwxr-xr-x | lib/Math/BigInt/t/sub_mbi.t | 2 |
4 files changed, 2 insertions, 95 deletions
diff --git a/lib/Math/BigInt/t/Math/BigFloat/Subclass.pm b/lib/Math/BigInt/t/Math/BigFloat/Subclass.pm deleted file mode 100644 index 7a1c2790cc..0000000000 --- a/lib/Math/BigInt/t/Math/BigFloat/Subclass.pm +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl -w - -package Math::BigFloat::Subclass; - -require 5.005_02; -use strict; - -use Exporter; -use Math::BigFloat(1.23); -use vars qw($VERSION @ISA $PACKAGE - $accuracy $precision $round_mode $div_scale); - -@ISA = qw(Exporter Math::BigFloat); - -$VERSION = 0.01; - -# Globals -$accuracy = $precision = undef; -$round_mode = 'even'; -$div_scale = 40; - -sub new -{ - my $proto = shift; - my $class = ref($proto) || $proto; - - my $value = shift || 0; # Set to 0 if not provided - my $decimal = shift; - my $radix = 0; - - # Store the floating point value - my $self = bless Math::BigFloat->new($value), $class; - $self->{'_custom'} = 1; # make sure this never goes away - return $self; -} - -1; diff --git a/lib/Math/BigInt/t/Math/BigInt/Subclass.pm b/lib/Math/BigInt/t/Math/BigInt/Subclass.pm deleted file mode 100644 index 79a4957d5b..0000000000 --- a/lib/Math/BigInt/t/Math/BigInt/Subclass.pm +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/perl -w - -package Math::BigInt::Subclass; - -require 5.005_02; -use strict; - -use Exporter; -use Math::BigInt(1.45); -use vars qw($VERSION @ISA $PACKAGE @EXPORT_OK - $accuracy $precision $round_mode $div_scale); - -@ISA = qw(Exporter Math::BigInt); -@EXPORT_OK = qw(bgcd); - -$VERSION = 0.01; - -# Globals -$accuracy = $precision = undef; -$round_mode = 'even'; -$div_scale = 40; - -sub new -{ - my $proto = shift; - my $class = ref($proto) || $proto; - - my $value = shift; # no || 0 here! - my $decimal = shift; - my $radix = 0; - - # Store the floating point value - my $self = bless Math::BigInt->new($value), $class; - $self->{'_custom'} = 1; # make sure this never goes away - return $self; -} - -sub bgcd - { - Math::BigInt::bgcd(@_); - } - -sub blcm - { - Math::BigInt::blcm(@_); - } - -sub import - { - my $self = shift; -# Math::BigInt->import(@_); - $self->SUPER::import(@_); # need it for subclasses - #$self->export_to_level(1,$self,@_); # need this ? - } - -1; diff --git a/lib/Math/BigInt/t/sub_mbf.t b/lib/Math/BigInt/t/sub_mbf.t index bde47fcf5b..e903ac2540 100755 --- a/lib/Math/BigInt/t/sub_mbf.t +++ b/lib/Math/BigInt/t/sub_mbf.t @@ -11,7 +11,7 @@ BEGIN if ($ENV{PERL_CORE}) { # testing with the core distribution - @INC = qw(../lib); + @INC = qw(../t/lib); } unshift @INC, '../lib'; if (-d 't') diff --git a/lib/Math/BigInt/t/sub_mbi.t b/lib/Math/BigInt/t/sub_mbi.t index 3f14535164..e387f89b37 100755 --- a/lib/Math/BigInt/t/sub_mbi.t +++ b/lib/Math/BigInt/t/sub_mbi.t @@ -11,7 +11,7 @@ BEGIN if ($ENV{PERL_CORE}) { # testing with the core distribution - @INC = qw(../lib); + @INC = qw(../t/lib); } unshift @INC, qw(../lib); if (-d 't') |