[perl-Gtk2/stable-1-22] Fix a test failure in GtkBuildableIface.t
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk2/stable-1-22] Fix a test failure in GtkBuildableIface.t
- Date: Sat, 6 Mar 2010 01:28:44 +0000 (UTC)
commit 575de4a8fb9b91b3b0c5e78e4bb2079ab3ebceed
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Sat Mar 6 02:20:50 2010 +0100
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.
t/GtkBuildableIface.t | 6 +++++-
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');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]