From: Dave Rolsky Date: Wed, 3 Sep 2008 15:42:39 +0000 (+0000) Subject: Cosmetic changes (mostly from perltidy). X-Git-Tag: 0.57~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d4d3bd093a5653b9a5fe106768e527d2fd910950;p=gitmo%2FMoose.git Cosmetic changes (mostly from perltidy). --- diff --git a/t/040_type_constraints/010_misc_type_tests.t b/t/040_type_constraints/010_misc_type_tests.t index 1aa0ba5..779bcf3 100644 --- a/t/040_type_constraints/010_misc_type_tests.t +++ b/t/040_type_constraints/010_misc_type_tests.t @@ -23,24 +23,27 @@ isa_ok($numb3rs, 'Moose::Meta::TypeConstraint'); { package Test::Moose::Meta::TypeConstraint::Union; - - use overload '""' => sub { 'Broken|Test' }, fallback => 1; + + use overload '""' => sub {'Broken|Test'}, fallback => 1; use Moose; - + extends 'Moose::Meta::TypeConstraint'; } -ok my $dummy_instance = Test::Moose::Meta::TypeConstraint::Union->new - => "Created Instance"; +my $dummy_instance = Test::Moose::Meta::TypeConstraint::Union->new; + +ok $dummy_instance => "Created Instance"; + +isa_ok $dummy_instance, + 'Test::Moose::Meta::TypeConstraint::Union' => 'isa correct type'; + +is "$dummy_instance", "Broken|Test" => + 'Got expected stringification result'; + +my $subtype1 = subtype 'New1' => as $dummy_instance; + +ok $subtype1 => 'made a subtype from our type object'; -isa_ok $dummy_instance, 'Test::Moose::Meta::TypeConstraint::Union' - => 'isa correct type'; +my $subtype2 = subtype 'New2' => as $subtype1; -is "$dummy_instance", "Broken|Test" - => "Got expected stringification result"; - -ok my $subtype1 = subtype('New1', as $dummy_instance) - => "made a subtype"; - -ok my $subtype2 = subtype('New2', as $subtype1) - => "made another subtype"; +ok $subtype2 => 'made a subtype of our subtype';