Add todo test for composing overloading from roles.
Florian Ragwitz [Wed, 8 Jul 2009 17:21:00 +0000 (19:21 +0200)]
t/030_roles/042_compose_overloading.t [new file with mode: 0644]

diff --git a/t/030_roles/042_compose_overloading.t b/t/030_roles/042_compose_overloading.t
new file mode 100644 (file)
index 0000000..cb7bf0c
--- /dev/null
@@ -0,0 +1,28 @@
+use strict;
+use warnings;
+use Test::More tests => 1;
+
+{
+    package Foo;
+    use Moose::Role;
+
+    use overload
+        q{""}    => sub { 42 },
+        fallback => 1;
+
+    no Moose::Role;
+}
+
+{
+    package Bar;
+    use Moose;
+    with 'Foo';
+    no Moose;
+}
+
+my $bar = Bar->new;
+
+TODO: {
+    local $TODO = "the special () method isn't properly composed into the class";
+    is("$bar", 42, 'overloading can be composed');
+}