Commit | Line | Data |
182134e8 |
1 | #!/usr/bin/perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
01bf4112 |
6 | use Test::More tests => 12; |
182134e8 |
7 | use Test::Exception; |
8 | |
9 | BEGIN { |
10 | use_ok('Moose::Util::TypeConstraints', (':no_export')); |
11 | } |
12 | |
01bf4112 |
13 | foreach 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 | )) { |
5e8a24e6 |
26 | is(Moose::Util::TypeConstraints::find_type_constraint($type_name)->name, |
27 | $type_name, |
28 | '... got the right name for ' . $type_name); |
01bf4112 |
29 | } |