[libmath-prime-util-perl] 41/50: Don't run the 64-bit edge case on broken 5.6.2

Partha P. Mukherjee ppm-guest at moszumanska.debian.org
Thu May 21 18:45:39 UTC 2015


This is an automated email from the git hooks/post-receive script.

ppm-guest pushed a commit to annotated tag v0.13
in repository libmath-prime-util-perl.

commit eb3b3dd928038cce60ab4df5926bbf4b42f3ac48
Author: Dana Jacobsen <dana at acm.org>
Date:   Sat Nov 17 13:49:03 2012 -0800

    Don't run the 64-bit edge case on broken 5.6.2
---
 t/10-isprime.t | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/t/10-isprime.t b/t/10-isprime.t
index 64a7734..a1df315 100644
--- a/t/10-isprime.t
+++ b/t/10-isprime.t
@@ -7,6 +7,7 @@ use Math::Prime::Util qw/is_prime/;
 
 my $use64 = Math::Prime::Util::prime_get_config->{'maxbits'} > 32;
 my $extra = defined $ENV{RELEASE_TESTING} && $ENV{RELEASE_TESTING};
+my $broken64 = (18446744073709550592 == ~0);
 
 plan tests => 6 + 19 + 3573 + (5 + 29 + 22 + 23 + 16) + 15 + 27 + 1
               + ($use64 ? 5+1 : 0)
@@ -112,5 +113,8 @@ map { ok(is_prime($_), "Primegap end $_ is prime" ) }
   if $use64 && $extra;
 
 # Check that we do the right thing near the word-size edge
-eval { is_prime( $use64 ? "18446744073709551629" : "4294967306" ); };
-like($@, qr/range/i, "is_prime on ~0 + delta without bigint should croak");
+SKIP: {
+  skip "Skipping 64-bit edge case on broken 64-bit Perl", 1 if $use64 && $broken64;
+  eval { is_prime( $use64 ? "18446744073709551629" : "4294967306" ); };
+  like($@, qr/range/i, "is_prime on ~0 + delta without bigint should croak");
+}

-- 
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