getting-there
[gitmo/Moose.git] / t / 053_util_find_type_constraint.t
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 use Test::More tests => 12;
7 use Test::Exception;
8
9 BEGIN {
10         use_ok('Moose::Util::TypeConstraints', (':no_export'));
11 }
12
13 *find_type_constraint = \&Moose::Util::TypeConstraints::find_type_constraint;
14
15 foreach my $type_name (qw(
16     Any
17         Value
18             Int
19             Str
20         Ref
21             ScalarRef
22             ArrayRef
23             HashRef
24             CodeRef
25             RegexpRef
26             Object    
27     )) {
28     is(find_type_constraint($type_name)->name, $type_name, '... got the right name for ' . $type_name);
29 }