This is an automatically generated mail to inform you that tests are now available in t/spec/S12-attributes/delegation.t
commit e0e8f85004675afcd492813be194b2483e32b3b6 Author: moritz <mor...@c213334d-75ef-0310-aa23-eaa082d1ae64> Date: Tue Jun 22 20:46:05 2010 +0000 [t/spec] test for RT #75966, delegation with parameters git-svn-id: http://svn.pugscode.org/p...@31411 c213334d-75ef-0310-aa23-eaa082d1ae64 diff --git a/t/spec/S12-attributes/delegation.t b/t/spec/S12-attributes/delegation.t index 8029839..ba85668 100644 --- a/t/spec/S12-attributes/delegation.t +++ b/t/spec/S12-attributes/delegation.t @@ -12,9 +12,14 @@ Delegation tests from L<S12/Delegation> # L<S12/Delegation> -class Backend1 { method hi() { 42 }; method cool() { 1337 } } +class Backend1 { + method hi() { 42 }; + method cool() { 1337 }; + method with_params($x) { $x xx 2 }; +} class Backend2 { method hi() { 23 }; method cool() { 539 } } class Frontend { has $.backend is rw handles "hi" } +class Frontend2 { has $.backend handles <with_params> }; ok Backend1.new, "class definition worked"; is Backend1.new.hi, 42, "basic sanity (1)"; @@ -38,6 +43,12 @@ is Backend2.new.hi, 23, "basic sanity (2)"; is $a.hi, 23, "method was successfully handled by backend object (2)"; } +#?rakudo skip 'RT 75966' +{ + my $a = Frontend2.new( backend => Backend1.new() ); + is $a.with_params('abc'), 'abcabc', 'Delegation works with parameters'; +} + # L<S12/Delegation/You can specify multiple method names:> class MultiFrontend { has $.backend is rw handles <hi cool> } ok MultiFrontend.new, "class definition using multiple method names worked";