Make sure that every type passes all its tests when unioned with itself
Dave Rolsky [Thu, 21 Apr 2011 20:55:22 +0000 (15:55 -0500)]
t/type_constraints/util_std_type_constraints.t

index 0ff5b20..9f8eac0 100644 (file)
@@ -717,6 +717,12 @@ my %tests = (
 
 for my $name ( sort keys %tests ) {
     test_constraint( $name, $tests{$name} );
+
+    test_constraint(
+        Moose::Util::TypeConstraints::find_or_create_type_constraint(
+            "$name|$name"),
+        $tests{$name}
+    );
 }
 
 # We need to test that the Str constraint accepts the return val of substr() -