Cleanup failing tests
[gitmo/Mouse.git] / Moose-t-failing / 600_todo_tests / 004_role_insertion_order.t
diff --git a/Moose-t-failing/600_todo_tests/004_role_insertion_order.t b/Moose-t-failing/600_todo_tests/004_role_insertion_order.t
new file mode 100644 (file)
index 0000000..7be8d3c
--- /dev/null
@@ -0,0 +1,46 @@
+#!/usr/bin/env 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};
+
+{
+    package Foo::Role;
+    use Mouse::Role;
+    has 'a' => (is => 'ro');
+    has 'b' => (is => 'ro');
+    has 'c' => (is => 'ro');
+}
+
+{
+    package Foo;
+    use Mouse;
+    has 'd' => (is => 'ro');
+    with 'Foo::Role';
+    has 'e' => (is => 'ro');
+}
+
+my %role_insertion_order = (
+    a => 0,
+    b => 1,
+    c => 2,
+);
+
+is_deeply({ map { $_->name => $_->insertion_order } map { Foo::Role->meta->get_attribute($_) } Foo::Role->meta->get_attribute_list }, \%role_insertion_order, "right insertion order within the role");
+
+my %class_insertion_order = (
+    d => 0,
+    a => 1,
+    b => 2,
+    c => 3,
+    e => 4,
+);
+
+{ local $TODO = "insertion order is lost during role application";
+is_deeply({ map { $_->name => $_->insertion_order } Foo->meta->get_all_attributes }, \%class_insertion_order, "right insertion order within the class");
+}
+
+done_testing;