Mouse::Util::does_role() respects $thing->does() method
[gitmo/Mouse.git] / t / 040_type_constraints / 004_util_find_type_constraint.t
CommitLineData
b2b106d7 1#!/usr/bin/perl
12497085 2# This is automatically generated by author/import-moose-test.pl.
3# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4use t::lib::MooseCompat;
b2b106d7 5
6use strict;
7use warnings;
8
12497085 9use Test::More;
b2b106d7 10use Test::Exception;
11
12BEGIN {
13 use_ok('Mouse::Util::TypeConstraints');
14}
15
16foreach 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
b2b106d7 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
12497085 41
42done_testing;