X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F040_type_constraints%2F017_subtyping_union_types.t;h=9b3ae246aa205a0303fed4c35a8f87492b71ea5f;hb=b10dde3a27c11623547417c599ccbd4f92e42651;hp=b76ae7ca578866e370e5b1b033eb587b3fcbafec;hpb=d4e538d9bf46d1c14d2ecfd36ac35ed541ae7ee6;p=gitmo%2FMoose.git diff --git a/t/040_type_constraints/017_subtyping_union_types.t b/t/040_type_constraints/017_subtyping_union_types.t index b76ae7c..9b3ae24 100644 --- a/t/040_type_constraints/017_subtyping_union_types.t +++ b/t/040_type_constraints/017_subtyping_union_types.t @@ -4,15 +4,15 @@ use strict; use warnings; use Test::More; -use Test::Exception; +use Test::Fatal; BEGIN { use_ok("Moose::Util::TypeConstraints"); } -lives_ok { +is( exception { subtype 'MyCollections' => as 'ArrayRef | HashRef'; -} '... created the subtype special okay'; +}, undef, '... created the subtype special okay' ); { my $t = find_type_constraint('MyCollections'); @@ -31,7 +31,7 @@ lives_ok { ok(!$t->check(1), '... validated it correctly'); } -lives_ok { +is( exception { subtype 'MyCollectionsExtended' => as 'ArrayRef|HashRef' => where { @@ -43,7 +43,7 @@ lives_ok { } 1; }; -} '... created the subtype special okay'; +}, undef, '... created the subtype special okay' ); { my $t = find_type_constraint('MyCollectionsExtended');