X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F05-advanced.t;h=76cd1341fb08a2f6d4635ddad06c66b06ec2f9bc;hb=d87e8b740c6b3e267831dd27a1177bb4f74e6255;hp=b05fb825f6036d1439c35a703b2249f6fc666c46;hpb=67a8bc0491edda720c7450433ccdf3cb07edb6ff;p=gitmo%2FMooseX-Types-Structured.git diff --git a/t/05-advanced.t b/t/05-advanced.t index b05fb82..76cd134 100644 --- a/t/05-advanced.t +++ b/t/05-advanced.t @@ -41,7 +41,7 @@ BEGIN { ## Dict key overloading subtype MorePersonalInfo, - as PersonalInfo[name=>MinFiveChars]; + as PersonalInfo[name=>MinFiveChars, stats=>MoreLengthPlease|Object]; has 'EqualLengthAttr' => (is=>'rw', isa=>EqualLength); has 'MoreLengthPleaseAttr' => (is=>'rw', isa=>MoreLengthPlease); @@ -125,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]]}; +