X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F040_type_constraints%2F010_misc_type_tests.t;h=f5cc487dad7f7490f41f36a1ff8cb822e92ce8b6;hb=9864f0e4ba233c5f30ad6dc7c484ced43d883d27;hp=57bc59f7e48a7d856dea524c382a91c5867e6564;hpb=8845df4dd6432e3164d078ade741409061adae9f;p=gitmo%2FMouse.git diff --git a/t/040_type_constraints/010_misc_type_tests.t b/t/040_type_constraints/010_misc_type_tests.t index 57bc59f..f5cc487 100644 --- a/t/040_type_constraints/010_misc_type_tests.t +++ b/t/040_type_constraints/010_misc_type_tests.t @@ -1,13 +1,9 @@ #!/usr/bin/perl -# This is automatically generated by author/import-moose-test.pl. -# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!! -use t::lib::MooseCompat; use strict; use warnings; use Test::More; -$TODO = q{Mouse is not yet completed}; use Test::Exception; use Scalar::Util qw(refaddr); @@ -27,7 +23,7 @@ isa_ok($numb3rs, 'Mouse::Meta::TypeConstraint'); # subtype with unions { - package Test::Mouse::Meta::TypeConstraint; + package Test::Mouse::Meta::TypeConstraint::Union; use overload '""' => sub {'Broken|Test'}, fallback => 1; use Mouse; @@ -35,12 +31,12 @@ isa_ok($numb3rs, 'Mouse::Meta::TypeConstraint'); extends 'Mouse::Meta::TypeConstraint'; } -my $dummy_instance = Test::Mouse::Meta::TypeConstraint->new; +my $dummy_instance = Test::Mouse::Meta::TypeConstraint::Union->new; ok $dummy_instance => "Created Instance"; isa_ok $dummy_instance, - 'Test::Mouse::Meta::TypeConstraint' => 'isa correct type'; + 'Test::Mouse::Meta::TypeConstraint::Union' => 'isa correct type'; is "$dummy_instance", "Broken|Test" => 'Got expected stringification result'; @@ -83,8 +79,8 @@ ok $subtype2 => 'made a subtype of our subtype'; my $foo = Mouse::Util::TypeConstraints::find_type_constraint('Foo'); my $bar = Mouse::Util::TypeConstraints::find_type_constraint('Bar'); - ok(!$foo->equals($bar), "Foo type is not equal to Bar type"); - ok( $foo->equals($foo), "Foo equals Foo"); + ok(!$foo->is_a_type_of($bar), "Foo type is not equal to Bar type"); + ok( $foo->is_a_type_of($foo), "Foo equals Foo"); ok( 0+$foo == refaddr($foo), "overloading works"); }