Permalink
Browse files

[t/spec] more warning suppressions; remaining STD warnings are mostly…

… bugs in test or STD

git-svn-id: http://svn.pugscode.org/pugs@31710 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent c0a7c8c commit f3414807358e6f20d72799ff07927f92d1f9ef9d lwall committed Jul 15, 2010
View
@@ -19,7 +19,7 @@ plan 15;
# introduce a scope with another lexical multi
{
- my multi sub mt(Str $x) { 'Str' }
+ my multi sub mt(Str $x) { 'Str' } #OK not used
is lt1(), 'Str', "lift picked up multis from caller's scope (Str)";
is lt2(), 'Any', "lift still considers outer multis";
}
@@ -32,8 +32,8 @@ plan 15;
multi sub lt4() { lift ``4 };
{
- my multi sub prefix:<``>(Str $x) { 'Str ``' };
- my multi sub prefix:<``>(Int $x) { 'Int ``' };
+ my multi sub prefix:<``>(Str $x) { 'Str ``' }; #OK not used
+ my multi sub prefix:<``>(Int $x) { 'Int ``' }; #OK not used
is lt3(), 'Str ``',
"lifted operator picked up multi from caller's scope (Str)";
is lt4(), 'Int ``',
@@ -36,7 +36,7 @@ plan 10;
}
{
- my sub test_this {
+ my sub test_this { #OK not used
ok 1, "Could call ok from within a lexical sub";
return 1;
}
@@ -37,7 +37,7 @@ plan 14;
{
my multi baz() { 1 }
{
- my multi baz() { 2 }
+ my multi baz() { 2 } #OK not used
dies_ok({ baz() }, 'inner multi conflicts with outer one');
}
is(baz(), 1, 'in outer scope, no inner multi, so no conflict');
@@ -46,7 +46,7 @@ plan 14;
# lexical multi can add to package multi if no outer lexical ones
multi waz() { 1 }
{
- my multi waz($x) { 2 }
+ my multi waz($x) { 2 } #OK not used
is(waz(), 1, 'got multi from package');
is(waz('slon'), 2, 'lexical multi also callable');
}
View
@@ -21,7 +21,7 @@ ok $collector == 6, 'Can call my_sub() if &my_sub was a parameter';
tester(sub ($x) { $collector = 3 * $x });
ok $collector == 12, 'same with anonymous sub';
-sub tester2(&my_sub) { 1 }
+sub tester2(&my_sub) { 1 } #OK not used
dies_ok {tester2(42)}, "can't pass thing that doesn't do Callable";
sub not_returns_a_sub { 3 };
@@ -27,7 +27,7 @@ ok($ok, 'used captured type later in the sig');
# Check you can use them to declare variables.
sub declare_cap_type(::T $x) { #OK not used
- my T $y = 4.2;
+ my T $y = 4.2; #OK not used
1
}
ok(declare_cap_type(3.3), 'can use captured type in declaration');
@@ -33,8 +33,8 @@ is($x.identity("w00t"), "w00t", 'called a method with a parameter');
# L<S12/Methods/"You can replace the identifier with a quoted string">
eval_dies_ok(q{$x.'foo'}, 'indirect method call using quotes, no parens');
-is($x.'bar'(), 101, 'indirect method call using quotes, with parens');
-is($x.'identity'('qwerty'), 'qwerty', 'indirect method call using quotes, with parameter');
+is($x.'bar'(), 101, 'indirect method call using quotes, with parens'); #OK use of quotes
+is($x.'identity'('qwerty'), 'qwerty', 'indirect method call using quotes, with parameter'); #OK use of quotes
{
my $name = 'foo';
eval_dies_ok(q{$x."$name"}, 'indirect method call, no parens');
@@ -55,7 +55,7 @@ class T2
}
my $o = A.new();
- is $o."abc"(), 'abc', 'calling method with $object."methodname"';
+ is $o."abc"(), 'abc', 'calling method with $object."methodname"'; #OK use of quotes
my $bc = 'bc';
is $o."a$bc"(), 'abc', 'calling method with $object."method$name"';
is $o."{$bc}d"(), 'bcd', 'calling method with $object."method$name"';
@@ -95,7 +95,7 @@ class T2
is $o.called, 3, 'called total three methods during dispatch';
}
-dies_ok { 23."nonexistingmethod"() }, "Can't call nonexisting method";
+dies_ok { 23."nonexistingmethod"() }, "Can't call nonexisting method"; #OK use of quotes
#?rakudo skip '.*, .+ and .? with @foo'
{
View
@@ -26,20 +26,20 @@ class Indir {
'bb';
}
method b_acc1 {
- self!"b"();
+ self!"b"(); #OK use of quotes
}
method b_acc2 {
- self!'b'();
+ self!'b'(); #OK use of quotes
}
}
my $o = Indir.new();
-is $o."a"(), "aa", 'indirect call to public method (double quotes)';
-is $o.'a'(), "aa", 'indirect call to public method (single quotes)';
+is $o."a"(), "aa", 'indirect call to public method (double quotes)'; #OK use of quotes
+is $o.'a'(), "aa", 'indirect call to public method (single quotes)'; #OK use of quotes
is $o.b_acc1, 'bb', 'indirect call to private method (double quotes)';
is $o.b_acc2, 'bb', 'indirect call to private method (single quotes)';
-dies_ok {$o."b"() }, 'can not call private method via quotes from outside';
+dies_ok {$o."b"() }, 'can not call private method via quotes from outside'; #OK use of quotes
# L<S14/Roles/"same, but &foo is aliased to &!foo">
View
@@ -111,7 +111,7 @@ ok eval('is_num_odd(3)'), "Int accepted by Num::Odd";
# Block parameter to smart-match is readonly.
{
subset SoWrong of Str where { $^epic = "fail" }
- sub so_wrong_too($x where { $^epic = "fail" }) { }
+ sub so_wrong_too($x where { $^epic = "fail" }) { } #OK not used
my SoWrong $x;
dies_ok({ $x = 42 }, 'parameter in subtype is read-only...');
dies_ok({ so_wrong_too(42) }, '...even in anonymous ones.');
View
@@ -359,7 +359,7 @@ lives_ok { uc(eval("")) }, 'can use eval("") in further expressions';
}
{
- sub def { my $x = [] }
+ sub def { my $x = [] } #OK not used
ok def() ~~ Array, 'sub returns array';
lives_ok { undefine def }, 'attempt to undefine returned array lives';
ok def() ~~ Array, 'sub still returns array';
View
@@ -10,15 +10,15 @@ plan *;
lives_ok { Date.new(:year(2010), :month(1), :day(1)) }, 'named arguments';
lives_ok { Date.today }, 'Date.today';
lives_ok {
- my $dt = DateTime.new(:year(2010),:month(06), :day(04));
+ my $dt = DateTime.new(:year(2010),:month(06), :day(04)); #OK octal
Date.new($dt);
}, 'Date.new from DateTime';
dies_ok { Date.new('malformed') }, 'obviously malformed string';
dies_ok { Date.new('2010-00-23') }, 'dies on zero-based months';
dies_ok { Date.new('2010-01-00') }, 'dies on zero-based days';
- isa_ok Date.new(2010, 01, 01), Date, 'Date.new() returns a Date';
+ isa_ok Date.new(2010, 01, 01), Date, 'Date.new() returns a Date'; #OK octal
}
# stringification

0 comments on commit f341480

Please sign in to comment.