summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorsten Schönfeld <kaffeetisch@gmx.de>2010-03-06 01:20:50 (GMT)
committerTorsten Schönfeld <kaffeetisch@gmx.de>2010-03-06 01:20:50 (GMT)
commitd0b0e0baf7a611c307040cef13773556a4898d08 (patch)
treeb15c55358d6cdc6f0f416e8be60bfb514cb06cb0
parenta9fd853fe8f200a3cfa78ec357639d087a23a97e (diff)
downloadperl-Gtk2-d0b0e0baf7a611c307040cef13773556a4898d08.zip
perl-Gtk2-d0b0e0baf7a611c307040cef13773556a4898d08.tar.xz
Fix a test failure in GtkBuildableIface.t
GtkWidget's implementation of the GtkBuildable methods set_name()/get_name() recently changed such that we cannot rely anymore on Gtk2::Widget::get_name() and Gtk2::Buildable::get_name() returning the same string for objects that inherit the Gtk2::Buildable implementation from Gtk2::Widget.
-rw-r--r--t/GtkBuildableIface.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/GtkBuildableIface.t b/t/GtkBuildableIface.t
index 8a576b4..5b766c7 100644
--- a/t/GtkBuildableIface.t
+++ b/t/GtkBuildableIface.t
@@ -68,7 +68,11 @@ sub on_thing1_changed {
my $view1 = $builder->get_object ('view1');
isa_ok ($view1, 'TestThingView');
-is ($view1->get_name (), 'view1');
+# TestThingView doesn't directly implement Gtk2::Buildable, thus it's not first
+# in the @ISA chain. So get_name() alone actually resolves to
+# Gtk2::Widget::get_name(), which breaks things as of gtk+ commit
+# 46f5ee1d0c0f4601853ed57e99b1b513f1baa445. So fully qualify the method.
+is ($view1->Gtk2::Buildable::get_name (), 'view1');
ok (! $view1->get ('visible'));
is ($view1->get ('thing'), $thing1);
is ($view1->get ('color-string'), 'purple');