Import tc tests
[gitmo/Mouse.git] / t / 040_type_constraints / failing / 004_util_find_type_constraint.t
CommitLineData
b2b106d7 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
6use Test::More tests => 18;
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
30 Role
31 )) {
32 is(find_type_constraint($type_name)->name,
33 $type_name,
34 '... got the right name for ' . $type_name);
35}
36
37# TODO:
38# add tests for is_subtype_of which confirm the hierarchy