remove trailing whitespace
[gitmo/Moose.git] / t / 040_type_constraints / 011_container_type_constraint.t
index 32b3430..c27d4b8 100644 (file)
@@ -3,12 +3,12 @@
 use strict;
 use warnings;
 
-use Test::More tests => 22;
+use Test::More tests => 24;
 use Test::Exception;
 
-BEGIN {    
-    use_ok('Moose::Util::TypeConstraints');               
-    use_ok('Moose::Meta::TypeConstraint::Parameterized');               
+BEGIN {
+    use_ok('Moose::Util::TypeConstraints');
+    use_ok('Moose::Meta::TypeConstraint::Parameterized');
 }
 
 # Array of Ints
@@ -64,3 +64,10 @@ ok(!$array_of_array_of_ints->check(
     [[ 1, 2, 3 ], [ qw/foo bar/ ]]
 ), '... [[ 1, 2, 3 ], [ qw/foo bar/ ]] failed successfully');
 
+{
+    my $anon_type = Moose::Util::TypeConstraints::find_or_parse_type_constraint('ArrayRef[Foo]');
+    isa_ok( $anon_type, 'Moose::Meta::TypeConstraint::Parameterized' );
+
+    my $param_type = $anon_type->type_parameter;
+    isa_ok( $param_type, 'Moose::Meta::TypeConstraint::Class' );
+}