[perl-Gtk3] Fix some test failures due to older dependencies
- From: Torsten SchÃnfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk3] Fix some test failures due to older dependencies
- Date: Sun, 24 Jun 2012 11:03:15 +0000 (UTC)
commit cccfe6d93d43f86b01629ba6cf81d41af933846f
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date: Sun Jun 24 13:02:24 2012 +0200
Fix some test failures due to older dependencies
NEWS | 1 +
t/overrides.t | 5 ++++-
t/zz-GtkCellLayoutIface.t | 24 ++++++++++++++----------
t/zz-GtkCellRendererIface.t | 6 +++++-
4 files changed, 24 insertions(+), 12 deletions(-)
---
diff --git a/NEWS b/NEWS
index a1b0ce0..2e612ab 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
{{$NEXT}}
* Add an override for Gtk3::show_about_dialog.
+* Fix some test failures due to older dependencies.
Overview of changes in Gtk3 0.006 [2012-06-04]
==============================================
diff --git a/t/overrides.t b/t/overrides.t
index 3b1372b..02cfce7 100644
--- a/t/overrides.t
+++ b/t/overrides.t
@@ -77,7 +77,10 @@ SKIP: {
}
# Gtk3::Menu::popup and popup_for_device
-{
+SKIP: {
+ skip 'incorrect annotations for menu position callbacks', 2
+ unless Gtk3::CHECK_VERSION (3, 2, 0);
+
{
my $menu = Gtk3::Menu->new;
my $position_callback = sub {
diff --git a/t/zz-GtkCellLayoutIface.t b/t/zz-GtkCellLayoutIface.t
index d7abff0..d445fc2 100644
--- a/t/zz-GtkCellLayoutIface.t
+++ b/t/zz-GtkCellLayoutIface.t
@@ -23,16 +23,20 @@ is (scalar @cells, 2);
isa_ok ($cells[0], 'Gtk3::CellRendererText');
isa_ok ($cells[1], 'Gtk3::CellRendererToggle');
-my $callback = sub {
- my ($cb_layout, $cb_cell, $model, $iter, $data) = @_;
- is ($cb_layout, $layout);
- is ($cb_cell, $cell);
- isa_ok ($model, 'Gtk3::ListStore');
- isa_ok ($iter, 'Gtk3::TreeIter');
- is ($data, 'bla!');
-};
-$layout->set_cell_data_func ($cell, $callback, 'bla!');
-$layout->set_cell_data_func ($cell, undef);
+SKIP: {
+ skip 'tree model ctors not properly supported', 9
+ unless check_gi_version(1, 29, 17);
+ my $callback = sub {
+ my ($cb_layout, $cb_cell, $model, $iter, $data) = @_;
+ is ($cb_layout, $layout);
+ is ($cb_cell, $cell);
+ isa_ok ($model, 'Gtk3::ListStore');
+ isa_ok ($iter, 'Gtk3::TreeIter');
+ is ($data, 'bla!');
+ };
+ $layout->set_cell_data_func ($cell, $callback, 'bla!');
+ $layout->set_cell_data_func ($cell, undef);
+}
package CustomCellLayout;
diff --git a/t/zz-GtkCellRendererIface.t b/t/zz-GtkCellRendererIface.t
index 9f5efde..0df2b9a 100644
--- a/t/zz-GtkCellRendererIface.t
+++ b/t/zz-GtkCellRendererIface.t
@@ -6,7 +6,11 @@ use strict;
use warnings;
use Glib ':constants';
-plan tests => 15;
+if (check_gi_version(1, 29, 17)) {
+ plan tests => 15;
+} else {
+ plan skip_all => 'tree model ctors not properly supported';
+}
{
package StandAlone;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]