Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[t/spec] more warning suppressions

git-svn-id: http://svn.pugscode.org/pugs@31707 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit 91600deaca396b0ff08b761aca248144ce8e93f1 1 parent cbb193a
lwall authored
View
2  S02-builtin_data_types/autovivification.t
@@ -60,7 +60,7 @@ sub foo ($baz is rw) { #OK not used
# just some random subroutine.
}
-sub bar ($baz is readonly) {
+sub bar ($baz is readonly) { #OK not used
# readonly signature, should it autovivify?
}
View
8 S02-literals/misc-interpolation.t
@@ -76,10 +76,10 @@ is(" \c[111] \c[107] ", ' o k ', "\\c[] respects whitespaces around it");
# L<S02/Literals/separating the numbers with comma:>
is("x \x[41,42,43] x", "x ABC x", "\\x[] allows multiple chars (1)");
-is("x \x[41,42,00043] x", "x ABC x", "\\x[] allows multiple chars (2)");
+is("x \x[41,42,00043] x", "x ABC x", "\\x[] allows multiple chars (2)"); #OK not indicate octal
is("x \x[ 41, 42, 43 ] x", "x ABC x", "\\x[] allows multiple chars with white space");
is("x \c[65,66,67] x", "x ABC x", "\\c[] allows multiple chars (1)");
-is("x \c[65,66,000067] x", "x ABC x", "\\c[] allows multiple chars (2)");
+is("x \c[65,66,000067] x", "x ABC x", "\\c[] allows multiple chars (2)"); #OK not indicate octal
is("x \c[ 65, 66, 67 ] x", "x ABC x", "\\c[] allows multiple chars with white space");
is("x \x[41,42,43]] x", "x ABC] x", "\\x[] should not eat following ]s");
@@ -94,9 +94,9 @@ is("x \c[65,66,67]] x", "x ABC] x", "\\c[] should not eat following ]s");
# ORLY, STD.pm parses that as an indirect method call. It will warn,
# but strictly speaking it's legal.
- is "|$x.'f'()|", '|int|',
+ is "|$x.'f'()|", '|int|', #OK use of quotes
'interpolation of indirect method calls (different quotes)';
- is "|$x."f"()|", '|int|',
+ is "|$x."f"()|", '|int|', #OK use of quotes
'interpolation of indirect method calls (same quotes)';
eval_dies_ok q["|$x."f "()"], '... but whitespaces are not allowed';
}
View
6 S02-literals/string-interpolation.t
@@ -7,9 +7,9 @@ plan *;
{
# The code of the closure takes a reference to the number 1, discards it
# and finally returns 42.
- is "{\01;42}", "42", '{\\01 parses correctly (1)';
- is "{;\01;42}", "42", '{\\01 parses correctly (2)';
- is "{;;;;;;\01;42}", "42", '{\\01 parses correctly (3)';
+ is "{\01;42}", "42", '{\\01 parses correctly (1)'; #OK not indicate octal
+ is "{;\01;42}", "42", '{\\01 parses correctly (2)'; #OK not indicate octal
+ is "{;;;;;;\01;42}", "42", '{\\01 parses correctly (3)'; #OK not indicate octal
}
{
View
2  S02-names_and_variables/signature.t
@@ -68,7 +68,7 @@ plan 12;
}
{
- my sub foo ($a, $b) {}
+ my sub foo ($a, $b) {} #OK not used
my $siglist = :($a);
ok $siglist !eqv &foo.signature,
View
6 S03-junctions/autothreading.t
@@ -106,8 +106,8 @@ plan 83;
has $.calls_b = 0;
has $.calls_c = 0;
multi method mmtest(Int $x) { $!calls_a++; return $x }
- multi method mmtest(Str $x, Str $y) { $!calls_b++ }
- multi method mmtest(Str $x) { $!calls_c++ }
+ multi method mmtest(Str $x, Str $y) { $!calls_b++ } #OK not used
+ multi method mmtest(Str $x) { $!calls_c++ } #OK not used
}
my ($obj, $r, $ok);
$obj = MMTest.new();
@@ -176,7 +176,7 @@ plan 83;
class JuncInvTest2 {
my $.cnt is rw = 0;
method a { $.cnt++; }
- method b($x) { $.cnt++ }
+ method b($x) { $.cnt++ } #OK not used
}
my $x = JuncInvTest1.new | JuncInvTest1.new | JuncInvTest2.new;
View
2  S03-operators/series-misc.t
@@ -27,7 +27,7 @@ is ('a', 'b', 'c', { $^x ~ 'x', $^y ~ 'y' ~ $^z ~ 'z' } ... *)[^9].join(' '), 'a
# L<S03/List infix precedence/it will be taken as a yada>
-dies_ok {(1, 2, ... 3)[2]}, 'yada operator not confused for series operator';
+dies_ok {(1, 2, ... 3)[2]}, 'yada operator not confused for series operator'; #OK apparent series operator
# L<S03/List infix precedence/and another function to continue the list>
# chained series
View
16 S03-smartmatch/any-bool.t
@@ -4,14 +4,14 @@ plan *;
#L<S03/Smart matching/Any Bool simple truth>
{
- ok (0 ~~ True), '$something ~~ True (1)';
- ok (0 ~~ Bool::True), '$something ~~ Bool::True (1)';
- ok ('a' ~~ True), '$something ~~ True (2)';
- ok ('a' ~~ Bool::True), '$something ~~ Bool::True (2)';
- ok !(0 ~~ False), '$something ~~ False (1)';
- ok !(0 ~~ Bool::False), '$something ~~ Bool::False (1)';
- ok !('a' ~~ False), '$something ~~ False (2)';
- ok !('a' ~~ Bool::False),'$something ~~ Bool::False (2)';
+ ok (0 ~~ True), '$something ~~ True (1)'; #OK always matches
+ ok (0 ~~ Bool::True), '$something ~~ Bool::True (1)'; #OK always matches
+ ok ('a' ~~ True), '$something ~~ True (2)'; #OK always matches
+ ok ('a' ~~ Bool::True), '$something ~~ Bool::True (2)'; #OK always matches
+ ok !(0 ~~ False), '$something ~~ False (1)'; #OK always fails
+ ok !(0 ~~ Bool::False), '$something ~~ Bool::False (1)'; #OK always fails
+ ok !('a' ~~ False), '$something ~~ False (2)'; #OK always fails
+ ok !('a' ~~ Bool::False),'$something ~~ Bool::False (2)'; #OK always fails
}
done_testing;
Please sign in to comment.
Something went wrong with that request. Please try again.