Merge branch 'topic/native-trait-bugfix'
[gitmo/Moose.git] / t / 040_type_constraints / 003_util_std_type_constraints.t
index 0af079a..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 ();
 
@@ -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;