test case for Moose 1.05 change to the concept of equality
[gitmo/MooseX-Types.git] / t / regressions / 01-is_subtype_of.t
CommitLineData
149f4b2d 1use strict;
2use warnings;
3
4use Test::More tests=>6;
5use MooseX::Types;
6use MooseX::Types::Moose qw(Any Item );
7
8
9my $item = subtype as 'Item';
10
11ok ( $item->is_subtype_of('Any'),
12 q[$item is subtype of 'Any']);
13
14ok ( Item->is_subtype_of('Any'),
15 q[Item is subtype of 'Any']);
16
17ok ( $item->is_subtype_of(Any),
18 q[Item is subtype of Any]);
19
20ok ( Item->is_subtype_of(Any),
21 q[Item is subtype of Any]);
22
23my $any = subtype as 'Any';
24
25ok ( $item->is_subtype_of($any),
26 q[$item is subtype of $any]);
27
28ok ( Item->is_subtype_of($any),
29 q[Item is subtype of $any]);
30
31