Move changelog for default fixes to NEXT
[gitmo/Moose.git] / t / 040_type_constraints / 016_subtyping_parameterized_types.t
index 81d7ff1..3c6971f 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 39;
+use Test::More;
 use Test::Exception;
 
 BEGIN {
@@ -119,3 +119,13 @@ lives_ok {
             as 'SubOfMyArrayRef[Str]';
     }, qr/Str is not a subtype of BiggerInt/, 'Failed to parameterize with a bad type parameter';
 }
+
+{
+    my $RefToInt = subtype as 'ScalarRef[Int]';
+
+    ok $RefToInt->check(\1), '\1 is okay';
+    ok !$RefToInt->check(1), '1 is not';
+    ok !$RefToInt->check(\"foo"), '\"foo" is not';
+}
+
+done_testing;