type-coercion-meta-object
[gitmo/Moose.git] / t / 053_util_find_type_constraint.t
index b3dc1e0..bd86bb0 100644 (file)
@@ -3,11 +3,27 @@
 use strict;
 use warnings;
 
-use Test::More tests => 1;
+use Test::More tests => 12;
 use Test::Exception;
 
 BEGIN {
        use_ok('Moose::Util::TypeConstraints', (':no_export'));
 }
 
-#diag Moose::Util::TypeConstraints::dump_type_constraints();
\ No newline at end of file
+foreach my $type_name (qw(
+    Any
+        Value
+            Int
+            Str
+        Ref
+            ScalarRef
+            ArrayRef
+            HashRef
+            CodeRef
+            RegexpRef
+            Object    
+    )) {
+    is(Moose::Util::TypeConstraints::find_type_constraint($type_name)->name, 
+       $type_name, 
+       '... got the right name for ' . $type_name);
+}
\ No newline at end of file