added new test case: t/030_roles/031_roles_applied_in_create.t
Tokuhiro Matsuno [Thu, 28 Aug 2008 14:05:29 +0000 (14:05 +0000)]
nothingmuch: this tests failed with perl5.10

t/030_roles/031_roles_applied_in_create.t [new file with mode: 0644]
t/lib/Role/Child.pm [new file with mode: 0644]
t/lib/Role/Interface.pm [new file with mode: 0644]
t/lib/Role/Parent.pm [new file with mode: 0644]

diff --git a/t/030_roles/031_roles_applied_in_create.t b/t/030_roles/031_roles_applied_in_create.t
new file mode 100644 (file)
index 0000000..752f954
--- /dev/null
@@ -0,0 +1,23 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+use Test::Exception;
+use Moose::Meta::Class;
+use Moose::Util;
+
+use lib 't/lib', 'lib';
+
+plan tests => 1;
+
+my $builder_meta = Moose::Meta::Class->create(
+    'YATTA' => (
+        superclass => 'Moose::Meta::Class',
+        roles      => [ qw( Role::Interface Role::Child ) ],
+    )
+);
+
+ok 1;
+
diff --git a/t/lib/Role/Child.pm b/t/lib/Role/Child.pm
new file mode 100644 (file)
index 0000000..f3542b0
--- /dev/null
@@ -0,0 +1,8 @@
+package Role::Child;
+use Moose::Role;
+
+with 'Role::Parent' => { alias => { meth1 => '_aliased', } };
+
+sub meth1 { }
+
+1;
diff --git a/t/lib/Role/Interface.pm b/t/lib/Role/Interface.pm
new file mode 100644 (file)
index 0000000..025cf40
--- /dev/null
@@ -0,0 +1,6 @@
+package Role::Interface;
+use Moose::Role;
+
+requires "meth2";
+
+1;
diff --git a/t/lib/Role/Parent.pm b/t/lib/Role/Parent.pm
new file mode 100644 (file)
index 0000000..0f49427
--- /dev/null
@@ -0,0 +1,7 @@
+package Role::Parent;
+use Moose::Role;
+
+sub meth2  { }
+sub meth1 { }
+
+1;