remove unneeded use of Test::Fatal
[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
a28e50e4 6use Test::More;
182134e8 7
8BEGIN {
ee195583 9 use_ok('Moose::Util::TypeConstraints');
182134e8 10}
11
01bf4112 12foreach my $type_name (qw(
13 Any
d03bd989 14 Item
5204cd52 15 Bool
451c8248 16 Undef
17 Defined
18 Value
19 Num
20 Int
21 Str
22 Ref
23 ScalarRef
5204cd52 24 ArrayRef
25 HashRef
451c8248 26 CodeRef
27 RegexpRef
d03bd989 28 Object
451c8248 29 Role
01bf4112 30 )) {
d03bd989 31 is(find_type_constraint($type_name)->name,
32 $type_name,
5e8a24e6 33 '... got the right name for ' . $type_name);
cce8198b 34}
35
36# TODO:
ee195583 37# add tests for is_subtype_of which confirm the hierarchy
a28e50e4 38
39done_testing;