Commit | Line | Data |
149f4b2d |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use Test::More tests=>6; |
5 | use MooseX::Types; |
6 | use MooseX::Types::Moose qw(Any Item ); |
7 | |
8 | |
9 | my $item = subtype as 'Item'; |
10 | |
11 | ok ( $item->is_subtype_of('Any'), |
12 | q[$item is subtype of 'Any']); |
13 | |
14 | ok ( Item->is_subtype_of('Any'), |
15 | q[Item is subtype of 'Any']); |
16 | |
17 | ok ( $item->is_subtype_of(Any), |
18 | q[Item is subtype of Any]); |
19 | |
20 | ok ( Item->is_subtype_of(Any), |
21 | q[Item is subtype of Any]); |
22 | |
23 | my $any = subtype as 'Any'; |
24 | |
25 | ok ( $item->is_subtype_of($any), |
26 | q[$item is subtype of $any]); |
27 | |
28 | ok ( Item->is_subtype_of($any), |
29 | q[Item is subtype of $any]); |
30 | |
31 | |