Commit | Line | Data |
149f4b2d |
1 | use strict; |
2 | use warnings; |
3 | |
1f071601 |
4 | use Test::More tests=>5; |
149f4b2d |
5 | use MooseX::Types; |
6 | use MooseX::Types::Moose qw(Any Item ); |
7 | |
8 | |
9 | my $item = subtype as 'Item'; |
10 | |
1f071601 |
11 | ok Item->equals('Item'); |
12 | ok Item->equals(Item); |
13 | |
149f4b2d |
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 | |
149f4b2d |
20 | ok ( Item->is_subtype_of(Any), |
21 | q[Item is subtype of Any]); |
22 | |
1f071601 |
23 | |
24 | __END__ |
25 | |
26 | |
149f4b2d |
27 | my $any = subtype as 'Any'; |
28 | |
1f071601 |
29 | ok ( $item->is_subtype_of(Any), |
30 | q[Item is subtype of Any]); |
31 | |
149f4b2d |
32 | ok ( $item->is_subtype_of($any), |
33 | q[$item is subtype of $any]); |
34 | |
35 | ok ( Item->is_subtype_of($any), |
36 | q[Item is subtype of $any]); |
37 | |
38 | |