X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F040_type_constraints%2F008_union_types.t;h=5c84661af4edf3ebd4216d1717b7e48d3e730051;hb=4c015454152fff7c0a2c71665d4dc5e0f39b835b;hp=16227bc9a999599ed9ad927ce11876afa2606d17;hpb=cbac012a1621da5d2c04ee898cc7f701f17cc045;p=gitmo%2FMoose.git diff --git a/t/040_type_constraints/008_union_types.t b/t/040_type_constraints/008_union_types.t index 16227bc..5c84661 100644 --- a/t/040_type_constraints/008_union_types.t +++ b/t/040_type_constraints/008_union_types.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 33; +use Test::More tests => 35; use Test::Exception; BEGIN { @@ -35,6 +35,9 @@ ok( $Str_or_Undef->equals($Str_or_Undef), "equal to self" ); ok( $Str_or_Undef->equals(Moose::Meta::TypeConstraint::Union->new(type_constraints => [ $Str, $Undef ])), "equal to clone" ); ok( $Str_or_Undef->equals(Moose::Meta::TypeConstraint::Union->new(type_constraints => [ $Undef, $Str ])), "equal to reversed clone" ); +ok( !$Str_or_Undef->is_a_type_of("ThisTypeDoesNotExist"), "not type of non existant type" ); +ok( !$Str_or_Undef->is_subtype_of("ThisTypeDoesNotExist"), "not subtype of non existant type" ); + # another .... my $ArrayRef = find_type_constraint('ArrayRef');