Skip to content

Commit

Permalink
[t/spec] Test for RT #62732
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.pugscode.org/pugs@27573 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
kyle committed Jul 16, 2009
1 parent 4081a4a commit 2d723b8
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion S12-class/instantiate.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 2;
plan 6;

# L<S12/Construction and Initialization>
# Basic instantiation.
Expand All @@ -20,3 +20,17 @@ class Foo2 {
}
my $foo2 = Foo2.new(:a(39), :b(3));
is($foo2.check(), 42, 'initializing attributes in new');

# RT #62732
{
eval 'NoSuchClass.new()';
ok $! ~~ Exception, 'death to instantiating nonexistent class';
ok "$!" ~~ / NoSuchClass /,
'error for "NoSuchClass.new()" mentions NoSuchClass';

eval 'NoSuch::Subclass.new()';
ok $! ~~ Exception, 'death to instantiating nonexistent::class';
#?rakudo todo 'RT #62732'
ok "$!" ~~ / 'NoSuch::Subclass' /,
'error for "NoSuch::Subclass.new()" mentions NoSuch::Subclass';
}

0 comments on commit 2d723b8

Please sign in to comment.