X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fforeign%2FMooseX-Method-Signatures%2Fundef_method_arg.t;fp=t%2Fforeign%2FMooseX-Method-Signatures%2Fundef_method_arg.t;h=cae67173079c9f4aa480ec7ff63b5ba2e8b5e292;hb=98e6239b969281c227be6ede859054786dd7b933;hp=b149bcffde23337a8ee9df851d9b6f4ab863d7a1;hpb=e158cf8f49978f42fb2380d3f84c5df963a39a3f;p=p5sagit%2FFunction-Parameters.git diff --git a/t/foreign/MooseX-Method-Signatures/undef_method_arg.t b/t/foreign/MooseX-Method-Signatures/undef_method_arg.t index b149bcf..cae6717 100644 --- a/t/foreign/MooseX-Method-Signatures/undef_method_arg.t +++ b/t/foreign/MooseX-Method-Signatures/undef_method_arg.t @@ -10,22 +10,22 @@ use Test::Fatal; method new($class:) { bless {}, $class } -# method m1(:$bar!) { } -# method m2(:$bar?) { } -# method m3(:$bar ) { } + method m1(:$bar ) { } + method m2(:$bar = undef) { } + method m3(:$bar ) { } -# method m4( $bar!) { } + method m4( $bar ) { } method m5( $bar = undef ) { } method m6( $bar ) { } } my $foo = Foo->new; -#is(exception { $foo->m1(bar => undef) }, undef, 'Explicitly pass undef to positional required arg'); -#is(exception { $foo->m2(bar => undef) }, undef, 'Explicitly pass undef to positional explicit optional arg'); -#is(exception { $foo->m3(bar => undef) }, undef, 'Explicitly pass undef to positional implicit optional arg'); +is(exception { $foo->m1(bar => undef) }, undef, 'Explicitly pass undef to positional required arg'); +is(exception { $foo->m2(bar => undef) }, undef, 'Explicitly pass undef to positional explicit optional arg'); +is(exception { $foo->m3(bar => undef) }, undef, 'Explicitly pass undef to positional implicit optional arg'); -#is(exception { $foo->m4(undef) }, undef, 'Explicitly pass undef to required arg'); +is(exception { $foo->m4(undef) }, undef, 'Explicitly pass undef to required arg'); is(exception { $foo->m5(undef) }, undef, 'Explicitly pass undef to explicit required arg'); is(exception { $foo->m6(undef) }, undef, 'Explicitly pass undef to implicit required arg');