X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F05-advanced.t;h=76cd1341fb08a2f6d4635ddad06c66b06ec2f9bc;hb=d0147de1b19ae3b9b490fe9f7fed336da26fdb4f;hp=be161e2a372dd36989087cb9c40ced3b4c58be73;hpb=686da114e30aae8bf5b1e57ffdb18493f5305551;p=gitmo%2FMooseX-Types-Structured.git diff --git a/t/05-advanced.t b/t/05-advanced.t index be161e2..76cd134 100644 --- a/t/05-advanced.t +++ b/t/05-advanced.t @@ -41,8 +41,7 @@ BEGIN { ## Dict key overloading subtype MorePersonalInfo, - # as PersonalInfo[name=>MinFiveChars]; - as PersonalInfo; + as PersonalInfo[name=>MinFiveChars, stats=>MoreLengthPlease|Object]; has 'EqualLengthAttr' => (is=>'rw', isa=>EqualLength); has 'MoreLengthPleaseAttr' => (is=>'rw', isa=>MoreLengthPlease); @@ -126,12 +125,9 @@ throws_ok sub { }, qr/Attribute \(MorePersonalInfo\) does not pass the type constraint/ => q{MorePersonalInfo correctly fails name=>'Johnnap', extra=>1, stats=>[[6,7,8,9,10],[11,12,13,14,15]]}; -SKIP: { - skip 'not yet working', 1; - - throws_ok sub { - $obj->MorePersonalInfo({name=>'abc', stats=>[[6,7,8,9,10],[11,12,13,14,15]]}); - }, qr/Attribute \(MorePersonalInfo\) does not pass the type constraint/ - => q{MorePersonalInfo correctly fails name=>'aaa', extra=>1, stats=>[[6,7,8,9,10],[11,12,13,14,15]]}; -} +throws_ok sub { + $obj->MorePersonalInfo({name=>'.bc', stats=>[[6,7,8,9,10],[11,12,13,14,15]]}); +}, qr/Attribute \(MorePersonalInfo\) does not pass the type constraint/ + => q{MorePersonalInfo correctly fails name=>'.bc', stats=>[[6,7,8,9,10],[11,12,13,14,15]]}; +