Forgot to fix the test count
[gitmo/Moose.git] / t / 040_type_constraints / 003_util_std_type_constraints.t
index e9c2d44..bb1ded0 100644 (file)
@@ -3,13 +3,13 @@
 use strict;
 use warnings;
 
-use Test::More tests => 291;
+use Test::More tests => 277;
 use Test::Exception;
 
 use Scalar::Util ();
 
 BEGIN {
-    use_ok('Moose::Util::TypeConstraints');           
+    use_ok('Moose::Util::TypeConstraints');
 }
 
 my $SCALAR_REF = \(my $var);
@@ -283,26 +283,6 @@ ok(!defined Object(qr/../),           '... Object rejects anything which is not
 ok(defined Object(bless {}, 'Foo'),   '... Object accepts anything which is blessed');
 ok(!defined Object(undef),             '... Object accepts anything which is blessed');
 
-{
-    package My::Role;
-    sub does { 'fake' }
-}
-
-ok(!defined Role(0),                    '... Role rejects anything which is not a Role');
-ok(!defined Role(100),                  '... Role rejects anything which is not a Role');
-ok(!defined Role(''),                   '... Role rejects anything which is not a Role');
-ok(!defined Role('Foo'),                '... Role rejects anything which is not a Role');
-ok(!defined Role([]),                   '... Role rejects anything which is not a Role');
-ok(!defined Role({}),                   '... Role rejects anything which is not a Role');
-ok(!defined Role(sub {}),               '... Role rejects anything which is not a Role');
-ok(!defined Role($SCALAR_REF),          '... Role rejects anything which is not a Role');
-ok(!defined Role($GLOB_REF),            '... Role rejects anything which is not a Role');
-ok(!defined Role($fh),                  '... Role rejects anything which is not a Role');
-ok(!defined Role(qr/../),               '... Role rejects anything which is not a Role');
-ok(!defined Role(bless {}, 'Foo'),      '... Role accepts anything which is not a Role');
-ok(defined Role(bless {}, 'My::Role'),  '... Role accepts anything which is not a Role');
-ok(!defined Role(undef),                 '... Role accepts anything which is not a Role');
-
 ok(!defined ClassName(0),               '... ClassName rejects anything which is not a ClassName');
 ok(!defined ClassName(100),             '... ClassName rejects anything which is not a ClassName');
 ok(!defined ClassName(''),              '... ClassName rejects anything which is not a ClassName');
@@ -349,9 +329,9 @@ ok(!defined RoleName($GLOB_REF),       '... Rolename rejects anything which is n
 ok(!defined RoleName(qr/../),          '... Rolename rejects anything which is not a RoleName');
 ok(!defined RoleName(bless {}, 'Foo'), '... Rolename rejects anything which is not a RoleName');
 ok(!defined RoleName(undef),           '... Rolename rejects anything which is not a RoleName');
-ok(!defined RoleName('UNIVERSAL'),      '... RoleName accepts anything which is a RoleName');
-ok(!defined RoleName('Quux::Wibble'),      '... RoleName accepts anything which is a RoleName');
-ok(!defined RoleName('Moose::Meta::TypeConstraint'), '... RoleName accepts anything which is a RoleName');
+ok(!defined RoleName('UNIVERSAL'),     '... Rolename rejects anything which is not a RoleName');
+ok(!defined RoleName('Quux::Wibble'),  '... Rolename rejects anything which is not a RoleName');
+ok(!defined RoleName('Moose::Meta::TypeConstraint'),  '... RoleName accepts anything which is a RoleName');
 ok(defined RoleName('Quux::Wibble::Role'),      '... RoleName accepts anything which is a RoleName');
 
 close($fh) || die "Could not close the filehandle $0 for test";