[libmath-prime-util-perl] 01/40: Try to work around old Activestate crud
Partha P. Mukherjee
ppm-guest at moszumanska.debian.org
Thu May 21 18:49:01 UTC 2015
This is an automated email from the git hooks/post-receive script.
ppm-guest pushed a commit to annotated tag v0.30
in repository libmath-prime-util-perl.
commit d0ba63c4a4d048f48f09c0846ef0f0ee7b1cb53e
Author: Dana Jacobsen <dana at acm.org>
Date: Sat Jun 1 07:25:24 2013 -0700
Try to work around old Activestate crud
---
t/70-rt-bignum.t | 7 +++++--
t/81-bignum.t | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/t/70-rt-bignum.t b/t/70-rt-bignum.t
index 6ea2148..2159fb4 100644
--- a/t/70-rt-bignum.t
+++ b/t/70-rt-bignum.t
@@ -23,8 +23,11 @@ my $n = 100199294509778143137521762187425301691197073534078445671945250753109628
my @partial_factor = Math::Prime::Util::PP::prho_factor(100199294509778143137521762187425301691197073534078445671945250753109628678272, 5);
-is_deeply( \@partial_factor,
- [2,2,2,2,2,2,2,3,7,37276523255125797298185179385202865212498911284999421752955822452793760669],
+my @expected_factors =
+ map { ($_ <= 4294967295 && ref($_)) ? int($_->bstr) : $_ }
+ (2,2,2,2,2,2,2,3,7,37276523255125797298185179385202865212498911284999421752955822452793760669);
+
+is_deeply( \@partial_factor, \@expected_factors,
"PP prho factors correctly with 'use bignum'" );
# The same thing happens in random primes, PP holf factoring,
diff --git a/t/81-bignum.t b/t/81-bignum.t
index e06ee79..a2f2c86 100644
--- a/t/81-bignum.t
+++ b/t/81-bignum.t
@@ -179,7 +179,7 @@ while (my($psrp, $baseref) = each (%pseudoprimes)) {
SKIP: {
skip "Your 64-bit Perl is broken, skipping pseudoprime tests for $psrp", 1 if $broken64 && $psrp == 3825123056546413051;
my $baselist = join(",", @$baseref);
- my @expmr = map { 1 } @$baseref;
+ my @expmr = map { (0!=1) } @$baseref;
my @gotmr = map { is_strong_pseudoprime($psrp, $_) } @$baseref;
is_deeply(\@gotmr, \@expmr, "$psrp is a strong pseudoprime to bases $baselist");
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmath-prime-util-perl.git
More information about the Pkg-perl-cvs-commits
mailing list