distinct custom types should not be equal
Ricardo Signes [Sun, 16 May 2010 23:36:09 +0000 (19:36 -0400)]
This test fails at present.

t/040_type_constraints/010_misc_type_tests.t

index 65987b6..04bc642 100644 (file)
@@ -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;