From: Ricardo Signes Date: Sun, 16 May 2010 23:36:09 +0000 (-0400) Subject: distinct custom types should not be equal X-Git-Tag: 1.04~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c38be0636500747f8977def2dab0f920ff81d168;p=gitmo%2FMoose.git distinct custom types should not be equal This test fails at present. --- diff --git a/t/040_type_constraints/010_misc_type_tests.t b/t/040_type_constraints/010_misc_type_tests.t index 65987b6..04bc642 100644 --- a/t/040_type_constraints/010_misc_type_tests.t +++ b/t/040_type_constraints/010_misc_type_tests.t @@ -66,4 +66,19 @@ ok $subtype2 => 'made a subtype of our subtype'; ); } +{ + for my $t (qw(Bar Foo)) { + my $tc = Moose::Meta::TypeConstraint->new({ + name => $t, + }); + + Moose::Util::TypeConstraints::register_type_constraint($tc); + } + + my $foo = Moose::Util::TypeConstraints::find_type_constraint('Foo'); + my $bar = Moose::Util::TypeConstraints::find_type_constraint('Bar'); + + ok(! $foo->equals($bar), "Foo type is not equal to Bar type"); +} + done_testing;