From: John Napiorkowski Date: Fri, 28 May 2010 17:55:24 +0000 (-0400) Subject: test case for Moose 1.05 change to the concept of equality X-Git-Tag: 0.22~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=149f4b2d9e5e37ee4100c79737891cd61c6257c1;hp=df773753182abe76c399b06a6df351fba80bd9bf;p=gitmo%2FMooseX-Types.git test case for Moose 1.05 change to the concept of equality --- diff --git a/t/regressions/01-is_subtype_of.t b/t/regressions/01-is_subtype_of.t new file mode 100644 index 0000000..1f2f000 --- /dev/null +++ b/t/regressions/01-is_subtype_of.t @@ -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]); + +