Commit | Line | Data |
---|---|---|
182134e8 | 1 | #!/usr/bin/perl |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | ||
5204cd52 | 6 | use Test::More tests => 15; |
182134e8 | 7 | use Test::Exception; |
8 | ||
9 | BEGIN { | |
7c13858b | 10 | use_ok('Moose::Util::TypeConstraints'); |
182134e8 | 11 | } |
12 | ||
01bf4112 | 13 | foreach my $type_name (qw( |
14 | Any | |
5204cd52 | 15 | Bool |
01bf4112 | 16 | Value |
17 | Int | |
18 | Str | |
19 | Ref | |
20 | ScalarRef | |
5204cd52 | 21 | CollectionRef |
22 | ArrayRef | |
23 | HashRef | |
01bf4112 | 24 | CodeRef |
25 | RegexpRef | |
26 | Object | |
5204cd52 | 27 | Role |
01bf4112 | 28 | )) { |
7c13858b | 29 | is(find_type_constraint($type_name)->name, |
5e8a24e6 | 30 | $type_name, |
31 | '... got the right name for ' . $type_name); | |
01bf4112 | 32 | } |