Skip to content

Commit

Permalink
check for Type suggestions in Undeclared::Symbols.
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed Jan 25, 2013
1 parent 73618a5 commit cc878f5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions S32-exceptions/misc.t
Expand Up @@ -363,6 +363,12 @@ if $emits_suggestions {
throws_like 'sub yoink(Junctoin $barf) { }', X::Parameter::InvalidType, suggestions => 'Junction';

throws_like 'my cool $a', X::Undeclared, suggestions => ["Cool", "Bool"];

{
try eval('Ecxeption.new("wrong!")');
ok $! ~~ X::Undeclared::Symbols, "Ecxeption.new throws X::Undeclared::Symbols";
is $!.type_suggestion<Ecxeption>, ["Exception"], 'Exception is a suggestion';
}
}

throws_like 'class Foobar is Foobar', X::Inheritance::SelfInherit, name => "Foobar";
Expand Down

0 comments on commit cc878f5

Please sign in to comment.