We only need local $? if we inline calls to DEMOLISH
[gitmo/Moose.git] / t / type_constraints / util_find_type_constraint.t
CommitLineData
182134e8 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
a28e50e4 6use Test::More;
182134e8 7
28fdde7f 8use Moose::Util::TypeConstraints;
182134e8 9
01bf4112 10foreach my $type_name (qw(
11 Any
d03bd989 12 Item
5204cd52 13 Bool
451c8248 14 Undef
15 Defined
16 Value
17 Num
18 Int
19 Str
20 Ref
21 ScalarRef
5204cd52 22 ArrayRef
23 HashRef
451c8248 24 CodeRef
25 RegexpRef
d03bd989 26 Object
01bf4112 27 )) {
d03bd989 28 is(find_type_constraint($type_name)->name,
29 $type_name,
5e8a24e6 30 '... got the right name for ' . $type_name);
cce8198b 31}
32
33# TODO:
ee195583 34# add tests for is_subtype_of which confirm the hierarchy
a28e50e4 35
36done_testing;