Skip to content

Commit

Permalink
Merge pull request #213 from dogbert17/test-rt-125135
Browse files Browse the repository at this point in the history
Test for RT 125135
  • Loading branch information
dogbert17 committed Jan 3, 2017
2 parents cd43168 + 13403ee commit 3e2015d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
6 changes: 6 additions & 0 deletions S12-meta/TestHOW.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class TestHOW is Metamodel::ClassHOW {
method add_method(Mu $obj, $name, $code)
{ callsame; }
}
my package EXPORTHOW {}
EXPORTHOW::<class> = TestHOW;
21 changes: 20 additions & 1 deletion S12-meta/classhow.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use Test;

plan 1;
use lib '.';

plan 4;

# RT #128516
#?rakudo.jvm skip 'StackOverflowError, RT #128516'
Expand All @@ -13,3 +15,20 @@ plan 1;
lives-ok { $obj.comp; $obj.gist },
'Storing a meta-object in an attribute then composing/gisting works out';
}

# RT #125135
{
use t::spec::S12-meta::TestHOW;

class TestClass {
method one {}
method two {}
method three {}
}

my $tc = TestClass.new;
my $err = 'Has the wrong block stolen the dispatcher';
ok $tc.can('one'), $err ~ ' - 1';
ok $tc.can('two'), $err ~ ' - 2';
ok $tc.can('three'),$err ~ ' - 3';
}

0 comments on commit 3e2015d

Please sign in to comment.