update foreign tests
[p5sagit/Function-Parameters.git] / t / foreign / Method-Signatures / invocant.t
index 3d53241..6f66d1c 100644 (file)
@@ -5,7 +5,11 @@
 use strict;
 use warnings FATAL => 'all';
 
-use Test::More 'no_plan';
+use Test::More
+    eval { require Moose }
+    ? (tests => 6)
+    : (skip_all => "Moose required for testing types")
+;
 
 our $skip_no_invocants;
 
@@ -35,13 +39,13 @@ our $skip_no_invocants;
 
     eval q{
 
-        method no_invocant_class_type($arg) {
+        method no_invocant_class_type(Foo::Bar $arg) {
             $self->bar($arg);
         }
 
-#        method no_invocant_named_param($arg) {
-#            $self->bar($arg);
-#        }
+        method no_invocant_named_param(Foo :$arg) {
+            $self->bar($arg);
+        }
 
     };
     is $@, '', 'compiles without invocant';
@@ -64,4 +68,4 @@ is( Stuff->without_space(42),       42 );
 
 my $stuff = Stuff->new;
 is( $stuff->no_invocant_class_type(Foo::Bar->new),     'Foo::Bar' );
-#is( $stuff->no_invocant_named_param(arg => Foo->new),  'Foo' );
+is( $stuff->no_invocant_named_param(arg => Foo->new),  'Foo' );