[libnet-openid-common-perl] 17/34: silence test warnings

gregor herrmann gregoa at debian.org
Sun Feb 7 21:50:17 UTC 2016


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

gregoa pushed a commit to annotated tag v1.030099_001
in repository libnet-openid-common-perl.

commit d17bd51af3cbcd1c9f0a74a9ec8dd2e27b106034
Author: Robert Norris <rob at eatenbyagrue.org>
Date:   Thu Nov 4 10:48:18 2010 +1100

    silence test warnings
---
 t/05-eq.t | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/t/05-eq.t b/t/05-eq.t
index 15a0db2..bb3d80c 100644
--- a/t/05-eq.t
+++ b/t/05-eq.t
@@ -1,5 +1,6 @@
 #!/usr/bin/perl
 
+use warnings;
 use strict;
 use utf8;
 
@@ -16,12 +17,12 @@ compare_comparisons('xx', 'xy', 'different, 2 chars');
 compare_comparisons('Frække frølår', 'Frække frølår', 'same, utf-8');
 compare_comparisons('Frøkke frålær', 'Frække frølår', 'different, utf-8');
 
-my $x='x' x 1,000,000;
-my $y='y' . 'x' x 999,999;
+my $x='x' x 1000000;
+my $y='y' . 'x' x 999999;
 compare_comparisons($x, $x, 'same, 1M chars');
 compare_comparisons($x, $y, 'different, 1M chars');
 
-my $z='x' x 999,999;
+my $z='x' x 999999;
 compare_comparisons( $x,   $z, 'different lengths, long');
 compare_comparisons('a', 'aa', 'different lengths, short');
 compare_comparisons( '',  'a', 'different lengths, shortest');
@@ -36,5 +37,11 @@ compare_comparisons(undef, undef, 'both undef');
 sub compare_comparisons {
     my ($first, $second, $description)=@_;
 
+    # XXX undefs make icky warnings but still need to be tested.
+    # possibly we should make timing_indep_eq produce exactly the same
+    # warnings as eq when faced with undefs, and then we should test
+    # the warnings. that seems like too much effort
+    no warnings 'uninitialized';
+
     is( ($first eq $second), OpenID::util::timing_indep_eq($first, $second), $description);
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libnet-openid-common-perl.git



More information about the Pkg-perl-cvs-commits mailing list