steal more tests from other modules
[p5sagit/Function-Parameters.git] / t / foreign / MooseX-Method-Signatures / undef_method_arg.t
index b149bcf..cae6717 100644 (file)
@@ -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');