Fix a cache data name in method delegation
[gitmo/Mouse.git] / t / 040_type_constraints / 004_util_find_type_constraint.t
CommitLineData
b2b106d7 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
9864f0e4 6use Test::More tests => 17;
b2b106d7 7use Test::Exception;
8
9BEGIN {
10 use_ok('Mouse::Util::TypeConstraints');
11}
12
13foreach my $type_name (qw(
14 Any
15 Item
16 Bool
17 Undef
18 Defined
19 Value
20 Num
21 Int
22 Str
23 Ref
24 ScalarRef
25 ArrayRef
26 HashRef
27 CodeRef
28 RegexpRef
29 Object
b2b106d7 30 )) {
31 is(find_type_constraint($type_name)->name,
32 $type_name,
33 '... got the right name for ' . $type_name);
34}
35
36# TODO:
37# add tests for is_subtype_of which confirm the hierarchy