remove trailing whitespace
[gitmo/Moose.git] / t / 040_type_constraints / 004_util_find_type_constraint.t
CommitLineData
182134e8 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
451c8248 6use Test::More tests => 18;
182134e8 7use Test::Exception;
8
9BEGIN {
7c13858b 10 use_ok('Moose::Util::TypeConstraints');
182134e8 11}
12
01bf4112 13foreach my $type_name (qw(
14 Any
d03bd989 15 Item
5204cd52 16 Bool
451c8248 17 Undef
18 Defined
19 Value
20 Num
21 Int
22 Str
23 Ref
24 ScalarRef
5204cd52 25 ArrayRef
26 HashRef
451c8248 27 CodeRef
28 RegexpRef
d03bd989 29 Object
451c8248 30 Role
01bf4112 31 )) {
d03bd989 32 is(find_type_constraint($type_name)->name,
33 $type_name,
5e8a24e6 34 '... got the right name for ' . $type_name);
cce8198b 35}
36
37# TODO:
38# add tests for is_subtype_of which confirm the hierarchy