From: Shawn M Moore Date: Thu, 5 Feb 2009 02:00:29 +0000 (+0000) Subject: We can't support this yet, so TODO and make sure we won't introduce bugs X-Git-Tag: 0.19~58 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e3e524d9fc5cd09262b463bc129c7b4eaf4c030b;p=gitmo%2FMouse.git We can't support this yet, so TODO and make sure we won't introduce bugs later --- diff --git a/t/040-existing-subclass.t b/t/040-existing-subclass.t index fe63fad..38f41f8 100644 --- a/t/040-existing-subclass.t +++ b/t/040-existing-subclass.t @@ -6,7 +6,7 @@ use Test::More; BEGIN { eval "use Test::Output;"; plan skip_all => "Test::Output is required for this test" if $@; - plan tests => 1; + plan tests => 2; } do { @@ -18,9 +18,30 @@ do { use Mouse; }; +TODO: { + local $TODO = "Mouse doesn't track enough context"; + stderr_is( + sub { Child->meta->make_immutable }, + "Not inlining a constructor for Child since it is not inheriting the default Mouse::Object constructor\n", + 'Mouse warns when it would have blown away the inherited constructor', + ); +} + +do { + package Foo; + use Mouse; + + __PACKAGE__->meta->make_immutable; + + package Bar; + use Mouse; + extends 'Foo'; + +}; + stderr_is( - sub { package Child; __PACKAGE__->meta->make_immutable }, - "Not inlining a constructor for Child since it is not inheriting the default Mouse::Object constructor\n", - 'Mouse warns when it would have blown away the inherited constructor', + sub { Bar->meta->make_immutable }, + "", + 'Mouse does not warn about inlining a constructor when the superclass inlined a constructor', );