test case for Moose 1.05 change to the concept of equality
John Napiorkowski [Fri, 28 May 2010 17:55:24 +0000 (13:55 -0400)]
t/regressions/01-is_subtype_of.t [new file with mode: 0644]

diff --git a/t/regressions/01-is_subtype_of.t b/t/regressions/01-is_subtype_of.t
new file mode 100644 (file)
index 0000000..1f2f000
--- /dev/null
@@ -0,0 +1,31 @@
+use strict;
+use warnings;
+
+use Test::More tests=>6;
+use MooseX::Types;
+use MooseX::Types::Moose qw(Any Item );
+
+
+my $item = subtype as 'Item';
+
+ok ( $item->is_subtype_of('Any'),
+  q[$item is subtype of 'Any']);
+
+ok ( Item->is_subtype_of('Any'),
+  q[Item is subtype of 'Any']);
+
+ok ( $item->is_subtype_of(Any),
+  q[Item is subtype of Any]);
+
+ok ( Item->is_subtype_of(Any),
+  q[Item is subtype of Any]);
+
+my $any = subtype as 'Any';
+
+ok ( $item->is_subtype_of($any),
+  q[$item is subtype of $any]);
+
+ok ( Item->is_subtype_of($any),
+  q[Item is subtype of $any]);
+
+