stuff
[gitmo/Moose.git] / t / 053_util_find_type_constraint.t
CommitLineData
182134e8 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
451c8248 6use Test::More tests => 18;
182134e8 7use Test::Exception;
8
9BEGIN {
7c13858b 10 use_ok('Moose::Util::TypeConstraints');
182134e8 11}
12
01bf4112 13foreach my $type_name (qw(
14 Any
451c8248 15 Item
5204cd52 16 Bool
451c8248 17 Undef
18 Defined
19 Value
20 Num
21 Int
22 Str
23 Ref
24 ScalarRef
5204cd52 25 ArrayRef
26 HashRef
451c8248 27 CodeRef
28 RegexpRef
29 Object
30 Role
01bf4112 31 )) {
7c13858b 32 is(find_type_constraint($type_name)->name,
5e8a24e6 33 $type_name,
34 '... got the right name for ' . $type_name);
01bf4112 35}