This is an automatically generated mail to inform you that tests are now available in t/spec/S12-methods/multi.t
commit 652203cdd73b00a2296712186ad8888fa07b8fec Author: kyle <k...@c213334d-75ef-0310-aa23-eaa082d1ae64> Date: Thu Sep 17 15:34:17 2009 +0000 [t/spec] Test for RT 69192 git-svn-id: http://svn.pugscode.org/p...@28272 c213334d-75ef-0310-aa23-eaa082d1ae64 diff --git a/t/spec/S12-methods/multi.t b/t/spec/S12-methods/multi.t index 30c913c..1266708 100644 --- a/t/spec/S12-methods/multi.t +++ b/t/spec/S12-methods/multi.t @@ -2,7 +2,7 @@ use v6; use Test; -plan 16; +plan 19; # L<S12/"Multisubs and Multimethods"> # L<S12/"Multi dispatch"> @@ -113,4 +113,39 @@ is Bar.new.a("not an Int"), 'Any-method in Foo'; 'call order is correct for class, role, parent' } +# RT 69192 +{ + role R5 { + multi method rt69192() { push @.order, 'empty' } + multi method rt69192(Str $a) { push @.order, 'Str' } + } + role R6 { + multi method rt69192(Num $a) { push @.order, 'Num' } + } + class RT69192 { has @.order } + + { + my RT69192 $bot .= new(); + $bot does R5 does R6; + $bot.*rt69192; + #?rakudo todo 'RT #69192' + is $bot.order, <empty>, 'multi method called once on empty signature'; + } + + { + my RT69192 $bot .= new(); + $bot does R5 does R6; + $bot.*rt69192('RT #69192'); + #?rakudo todo 'RT #69192' + is $bot.order, <Str>, 'multi method called once on Str signature'; + } + + { + my RT69192 $bot .= new(); + $bot does R5 does R6; + $bot.*rt69192( 69192 ); + is $bot.order, <Num>, 'multi method called once on Num signature'; + } +} + # vim: ft=perl6