[libmath-prime-util-perl] 102/181: Add test for t/81-bignum.t no-clobber

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


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

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

commit 114a02aa2d5d264cad99a58a18624cce3d27f3a0
Author: Dana Jacobsen <dana at acm.org>
Date:   Thu Jan 2 11:14:18 2014 -0800

    Add test for t/81-bignum.t no-clobber
---
 t/81-bignum.t | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/t/81-bignum.t b/t/81-bignum.t
index d542602..eab4985 100644
--- a/t/81-bignum.t
+++ b/t/81-bignum.t
@@ -80,7 +80,7 @@ plan tests =>  0
              + 2   # liouville
              + 15  # random primes
              + 2   # miller-rabin random
-             + 0;
+             + 1;
 
 # Using GMP makes these tests run about 2x faster on some machines
 use bigint try => 'GMP';   #  <--------------- large numbers ahead!  > 2^64
@@ -143,6 +143,8 @@ diag "BigInt $bignumver/$bigintver, lib: $bigintlib.  MPU::GMP $mpugmpver\n";
 
 ###############################################################################
 
+$_ = 'this should not change';
+
 foreach my $n (@primes) {
   ok( is_prime($n), "$n is prime" );
   ok( is_prob_prime($n), "$n is probably prime");
@@ -293,6 +295,8 @@ is( miller_rabin_random( $randprime, 40 ), "0", "80-bit composite fails Miller-R
 
 ###############################################################################
 
+is( $_, 'this should not change', "Nobody clobbered \$_" );
+
 
 sub check_pcbounds {
   my ($n, $expn, $percent, $percentrh) = @_;

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