Mouse::Util::does_role() respects $thing->does() method
[gitmo/Mouse.git] / t / 040_type_constraints / 004_util_find_type_constraint.t
1 #!/usr/bin/perl
2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
5
6 use strict;
7 use warnings;
8
9 use Test::More;
10 use Test::Exception;
11
12 BEGIN {
13     use_ok('Mouse::Util::TypeConstraints');
14 }
15
16 foreach my $type_name (qw(
17     Any
18     Item
19         Bool
20         Undef
21         Defined
22             Value
23                 Num
24                   Int
25                 Str
26             Ref
27                 ScalarRef
28                 ArrayRef
29                 HashRef
30                 CodeRef
31                 RegexpRef
32                 Object
33     )) {
34     is(find_type_constraint($type_name)->name,
35        $type_name,
36        '... got the right name for ' . $type_name);
37 }
38
39 # TODO:
40 # add tests for is_subtype_of which confirm the hierarchy
41
42 done_testing;