Commit | Line | Data |
b2b106d7 |
1 | #!/usr/bin/perl |
12497085 |
2 | # This is automatically generated by author/import-moose-test.pl. |
3 | # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!! |
4 | use t::lib::MooseCompat; |
b2b106d7 |
5 | |
6 | use strict; |
7 | use warnings; |
8 | |
12497085 |
9 | use Test::More; |
b2b106d7 |
10 | use Test::Exception; |
11 | |
12 | BEGIN { |
13 | use_ok('Mouse::Util::TypeConstraints'); |
14 | } |
15 | |
16 | foreach my $type_name (qw( |
17 | Any |
18 | Item |
19 | Bool |
20 | Undef |
21 | Defined |
22 | Value |
23 | Num |
24 | Int |
25 | Str |
26 | Ref |
27 | ScalarRef |
28 | ArrayRef |
29 | HashRef |
30 | CodeRef |
31 | RegexpRef |
32 | Object |
b2b106d7 |
33 | )) { |
34 | is(find_type_constraint($type_name)->name, |
35 | $type_name, |
36 | '... got the right name for ' . $type_name); |
37 | } |
38 | |
39 | # TODO: |
40 | # add tests for is_subtype_of which confirm the hierarchy |
12497085 |
41 | |
42 | done_testing; |