required does not throw an error if it has a default value
[gitmo/Moose.git] / t / 053_util_find_type_constraint.t
CommitLineData
182134e8 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
01bf4112 6use Test::More tests => 12;
182134e8 7use Test::Exception;
8
9BEGIN {
7c13858b 10 use_ok('Moose::Util::TypeConstraints');
182134e8 11}
12
01bf4112 13foreach my $type_name (qw(
14 Any
15 Value
16 Int
17 Str
18 Ref
19 ScalarRef
20 ArrayRef
21 HashRef
22 CodeRef
23 RegexpRef
24 Object
25 )) {
7c13858b 26 is(find_type_constraint($type_name)->name,
5e8a24e6 27 $type_name,
28 '... got the right name for ' . $type_name);
01bf4112 29}