4 use Test::More tests=>5;
6 use MooseX::Types::Moose qw(Any Item );
9 my $item = subtype as 'Item';
11 ok Item->equals('Item');
12 ok Item->equals(Item);
14 ok ( $item->is_subtype_of('Any'),
15 q[$item is subtype of 'Any']);
17 ok ( Item->is_subtype_of('Any'),
18 q[Item is subtype of 'Any']);
20 ok ( Item->is_subtype_of(Any),
21 q[Item is subtype of Any]);
27 my $any = subtype as 'Any';
29 ok ( $item->is_subtype_of(Any),
30 q[Item is subtype of Any]);
32 ok ( $item->is_subtype_of($any),
33 q[$item is subtype of $any]);
35 ok ( Item->is_subtype_of($any),
36 q[Item is subtype of $any]);