Permalink
Browse files

[t] warning suppression

git-svn-id: http://svn.pugscode.org/pugs@26617 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent c4f04ed commit 5b8dc6b7a34c3c88f34ab501105640d4b6280f03 lwall committed May 2, 2009
@@ -28,7 +28,7 @@ plan 19;
{
constant foo2 = 42;
}
- dies_ok { foo2 == 42 }, 'constants are lexically scoped';
+ eval_dies_ok 'foo2 == 42', 'constants are lexically scoped';
}
{
View
@@ -29,7 +29,7 @@ my Fish $c;
my @array = ($a, $b, $c);
regex canine { <.isa(Dog)> }
-regex herbivore { <.isa(Antelope)> };
+regex herbivore { <.isa(::Antelope)> };
# does that work? ord does it need a Cat?
ok(@array ~~ /<canine>/, 'rules on an array - positive');
@@ -10,7 +10,7 @@ plan 14;
my multi foo() { 42 }
is(foo(), 42, 'can call lexically scoped multi');
}
- dies_ok({ foo() }, 'lexical multi not callable outside of lexical scope');
+ eval_dies_ok(q{ foo() }, 'lexical multi not callable outside of lexical scope');
}
# test that lexical multis in inner scopes add to those in outer scopes
@@ -29,8 +29,8 @@ plan 14;
dies_ok({ bar('pivo') }, 'multi variant from inner scope not callable in outer');
}
- dies_ok({ bar() }, 'no multi variants callable outside of lexical scope');
- dies_ok({ bar('kava') }, 'no multi variants callable outside of lexical scope');
+ eval_dies_ok(q{ bar() }, 'no multi variants callable outside of lexical scope');
+ eval_dies_ok(q{ bar('kava') }, 'no multi variants callable outside of lexical scope');
}
# an inner multi with a signature matching an outer will conflict
@@ -15,7 +15,7 @@ ok @named_array.test_method, "Uninitialized array";
ok @named_array.test_method, "Populated array";
-ok try({ [].test_method }), "Bare arrayref";
+ok try { [].test_method }, "Bare arrayref";
my $arrayref = [];
@@ -31,7 +31,7 @@ ok %named_hash.test_method, "Uninitialized hash";
ok %named_hash.test_method, "Populated hash";
-ok try({ ~{foo => "bar"}.test_method }), "Bare hashref";
+ok try { ~{foo => "bar"}.test_method }, "Bare hashref";
my $hashref = {foo => "bar"};
@@ -41,7 +41,7 @@ ok $hashref.test_method, "Named hashref";
# Now for pairs.
#?rakudo skip "No applicable candidates found to dispatch to for 'is'"
-is(try({ (:key<value>).value; }), 'value', "method on a bare pair");
+is(try { (:key<value>).value; }, 'value', "method on a bare pair");
my $pair = :key<value>;
View
@@ -66,6 +66,8 @@ is($foo.noargs(), 42, "... parentheses after method");
#?rakudo todo 'method should not be usable as sub'
dies_ok( { Zoo.new.c }, "meth(%h) is not a valid method call syntax");
}
+# doesn't match, but defines "b"
+sub b() { die "oops" }
# this used to be a Rakudo bug, RT #62046
{
View
@@ -35,7 +35,7 @@ ok defined($baz does Foo), 'mixing in our Foo role into $baz worked';
#?pugs skip 3 'feature'
ok $baz.HOW.does($baz, Foo), '.HOW.does said our $baz now does Foo';
ok $baz.^does(Foo), '.^does said our $baz now does Foo';
-dies_ok { $baz ~~ Baz }, 'smartmatch against non-existent type dies';
+eval_dies_ok q{ $baz ~~ Baz }, 'smartmatch against non-existent type dies';
# L<S14/Roles/but with a role keyword:>
# Roles may have methods
View
@@ -45,7 +45,7 @@ plan 11;
{
my @arr = <1 2 3 4>;
- dies_ok { isa(@arr, Array) }, 'no sub called isa()';
+ eval_dies_ok 'isa(@arr, Array)', 'no sub called isa()';
dies_ok { @arr.isa() }, '... isa() with a single arg is a failing case (invocant notation)';
dies_ok { @arr.isa(Array, Hash) }, '... isa() with a extra args is a failing case (invocant notation)';

0 comments on commit 5b8dc6b

Please sign in to comment.