X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Types-Structured.git;a=blobdiff_plain;f=t%2F12-error.t;h=d66cd61f7b31a5b531c1cd0e3856fdda3111ac43;hp=2c3ca141323d5bb4a8c4fa614d87c6f06bf7d6f1;hb=68d0710ba681a67640606b965dc5756de252c8c1;hpb=a59fe2a6395e614a5816c5f28a75e6f6fad25460 diff --git a/t/12-error.t b/t/12-error.t index 2c3ca14..d66cd61 100644 --- a/t/12-error.t +++ b/t/12-error.t @@ -23,7 +23,7 @@ ok !$simple_dict->check({name=>$simple_dict,age=>'hello'}), "simple_dict fails: ## Let's check all the expected validation errors for tuple like $simple_tuple->validate({a=>1,b=>2}), - qr/Validation failed for 'simple_tuple' failed with value { a => 1, b => 2 }/, + qr/Validation failed for 'simple_tuple' failed with value { a: 1, b: 2 }/, 'Wrong basic type'; like $simple_tuple->validate(['a','b']), @@ -53,7 +53,7 @@ like $simple_dict->validate({name=>'John',age=>'a'}), 'Correctly failed due to age not an Int'; like $simple_dict->validate({name=>$simple_dict,age=>1}), - qr/failed with value { age => 1, name => MooseX:/, + qr/failed with value { age: 1, name: MooseX:/, 'Correctly failed due to object not a Str'; like $simple_dict->validate({name=>'John'}), @@ -70,7 +70,7 @@ like $simple_dict->validate({name=>'Vincent', age=>15,extra=>'morethanIneed'}), my $optional_dict = subtype 'optional_dict', as Dict[name=>Str,age=>Optional[Int]]; like $optional_tuple->validate({a=>1,b=>2}), - qr/Validation failed for 'optional_tuple' failed with value { a => 1, b => 2 }/, + qr/Validation failed for 'optional_tuple' failed with value { a: 1, b: 2 }/, 'Wrong basic type'; like $optional_tuple->validate(['a','b']), @@ -94,7 +94,7 @@ like $optional_dict->validate({name=>'John',age=>'a'}), 'Correctly failed due to age not an Int'; like $optional_dict->validate({name=>$simple_dict,age=>1}), - qr/failed with value { age => 1, name => MooseX:/, + qr/failed with value { age: 1, name: MooseX:/, 'Correctly failed due to object not a Str'; like $optional_dict->validate({name=>'Vincent', age=>15,extra=>'morethanIneed'}),