We only need local $? if we inline calls to DEMOLISH
[gitmo/Moose.git] / t / type_constraints / util_find_type_constraint.t
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 use Test::More;
7
8 use Moose::Util::TypeConstraints;
9
10 foreach my $type_name (qw(
11     Any
12     Item
13         Bool
14         Undef
15         Defined
16             Value
17                 Num
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,
29        $type_name,
30        '... got the right name for ' . $type_name);
31 }
32
33 # TODO:
34 # add tests for is_subtype_of which confirm the hierarchy
35
36 done_testing;