fix typo in docs: . instead of ;
[gitmo/Moose.git] / t / 040_type_constraints / 003_util_std_type_constraints.t
index 5f0e119..20c0f54 100644 (file)
@@ -3,8 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 298;
-use Test::Exception;
+use Test::More;
 
 use Scalar::Util ();
 
@@ -135,20 +134,20 @@ ok(!defined Ref(undef),           '... Ref rejects anything which is not a Ref')
 
 ok(defined Int(0),                 '... Int accepts anything which is an Int');
 ok(defined Int(100),               '... Int accepts anything which is an Int');
-ok(!defined Int(0.5),              '... Int accepts anything which is not a Int');
-ok(!defined Int(100.01),           '... Int accepts anything which is not a Int');
-ok(!defined Int(''),               '... Int rejects anything which is not a Int');
-ok(!defined Int('Foo'),            '... Int rejects anything which is not a Int');
-ok(!defined Int([]),               '... Int rejects anything which is not a Int');
-ok(!defined Int({}),               '... Int rejects anything which is not a Int');
-ok(!defined Int(sub {}),           '... Int rejects anything which is not a Int');
-ok(!defined Int($SCALAR_REF),      '... Int rejects anything which is not a Int');
-ok(!defined Int($GLOB),            '... Int rejects anything which is not a Int');
-ok(!defined Int($GLOB_REF),        '... Int rejects anything which is not a Int');
-ok(!defined Int($fh),              '... Int rejects anything which is not a Int');
-ok(!defined Int(qr/../),           '... Int rejects anything which is not a Int');
-ok(!defined Int(bless {}, 'Foo'),  '... Int rejects anything which is not a Int');
-ok(!defined Int(undef),            '... Int rejects anything which is not a Int');
+ok(!defined Int(0.5),              '... Int accepts anything which is not an Int');
+ok(!defined Int(100.01),           '... Int accepts anything which is not an Int');
+ok(!defined Int(''),               '... Int rejects anything which is not an Int');
+ok(!defined Int('Foo'),            '... Int rejects anything which is not an Int');
+ok(!defined Int([]),               '... Int rejects anything which is not an Int');
+ok(!defined Int({}),               '... Int rejects anything which is not an Int');
+ok(!defined Int(sub {}),           '... Int rejects anything which is not an Int');
+ok(!defined Int($SCALAR_REF),      '... Int rejects anything which is not an Int');
+ok(!defined Int($GLOB),            '... Int rejects anything which is not an Int');
+ok(!defined Int($GLOB_REF),        '... Int rejects anything which is not an Int');
+ok(!defined Int($fh),              '... Int rejects anything which is not an Int');
+ok(!defined Int(qr/../),           '... Int rejects anything which is not an Int');
+ok(!defined Int(bless {}, 'Foo'),  '... Int rejects anything which is not an Int');
+ok(!defined Int(undef),            '... Int rejects anything which is not an Int');
 
 ok(defined Num(0),                 '... Num accepts anything which is an Num');
 ok(defined Num(100),               '... Num accepts anything which is an Num');
@@ -191,6 +190,7 @@ ok(!defined ScalarRef([]),               '... ScalarRef rejects anything which i
 ok(!defined ScalarRef({}),               '... ScalarRef rejects anything which is not a ScalarRef');
 ok(!defined ScalarRef(sub {}),           '... ScalarRef rejects anything which is not a ScalarRef');
 ok(defined ScalarRef($SCALAR_REF),       '... ScalarRef accepts anything which is a ScalarRef');
+ok(defined ScalarRef(\$SCALAR_REF),      '... ScalarRef accepts references to references');
 ok(!defined ScalarRef($GLOB),            '... ScalarRef rejects anything which is not a ScalarRef');
 ok(!defined ScalarRef($GLOB_REF),        '... ScalarRef rejects anything which is not a ScalarRef');
 ok(!defined ScalarRef($fh),              '... ScalarRef rejects anything which is not a ScalarRef');
@@ -359,3 +359,5 @@ ok(!defined RoleName('Moose::Meta::TypeConstraint'),  '... RoleName accepts anyt
 ok(defined RoleName('Quux::Wibble::Role'),      '... RoleName accepts anything which is a RoleName');
 
 close($fh) || die "Could not close the filehandle $0 for test";
+
+done_testing;