From: Matt S Trout Date: Wed, 14 Nov 2007 18:05:02 +0000 (+0000) Subject: add failing test for ClassName constraint X-Git-Tag: 0_30~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5030b52f1ef04d755d43ef1e615258a751f2e763;p=gitmo%2FMoose.git add failing test for ClassName constraint --- diff --git a/t/040_type_constraints/003_util_std_type_constraints.t b/t/040_type_constraints/003_util_std_type_constraints.t index 780405d..3341efc 100644 --- a/t/040_type_constraints/003_util_std_type_constraints.t +++ b/t/040_type_constraints/003_util_std_type_constraints.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 269; +use Test::More tests => 270; use Test::Exception; use Scalar::Util (); @@ -303,6 +303,12 @@ ok(!defined ClassName(0), '... ClassName rejects anything which is ok(!defined ClassName(100), '... ClassName rejects anything which is not a ClassName'); ok(!defined ClassName(''), '... ClassName rejects anything which is not a ClassName'); ok(!defined ClassName('Baz'), '... ClassName rejects anything which is not a ClassName'); + +{ + package Quux::Wibble; # this makes Quux symbol table exist +} + +ok(!defined ClassName('Quux'), '... ClassName rejects anything which is not a ClassName'); ok(!defined ClassName([]), '... ClassName rejects anything which is not a ClassName'); ok(!defined ClassName({}), '... ClassName rejects anything which is not a ClassName'); ok(!defined ClassName(sub {}), '... ClassName rejects anything which is not a ClassName');