[Moose-commits] r7549 - Mouse/trunk/t
sartak at code2.0beta.co.uk
sartak at code2.0beta.co.uk
Thu Feb 5 02:00:30 GMT 2009
Author: sartak
Date: 2009-02-04 18:00:29 -0800 (Wed, 04 Feb 2009)
New Revision: 7549
Modified:
Mouse/trunk/t/040-existing-subclass.t
Log:
We can't support this yet, so TODO and make sure we won't introduce bugs
later
Modified: Mouse/trunk/t/040-existing-subclass.t
===================================================================
--- Mouse/trunk/t/040-existing-subclass.t 2009-02-05 01:53:31 UTC (rev 7548)
+++ Mouse/trunk/t/040-existing-subclass.t 2009-02-05 02:00:29 UTC (rev 7549)
@@ -6,7 +6,7 @@
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 @@
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',
);
More information about the Moose-commits
mailing list