[perl-Gtk3] Fix test failures with gtk+ 3.0



commit 9a632bc01abe7c148337f4648ca73384685b76e2
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Sat Nov 15 16:52:01 2014 +0100

    Fix test failures with gtk+ 3.0
    
    All of them due to annotations that were missing at the time.

 t/zz-GtkImage.t           |   32 +-------------------------------
 t/zz-GtkRadioButton.t     |    6 +++++-
 t/zz-GtkRadioMenuItem.t   |    6 +++++-
 t/zz-GtkRadioToolButton.t |    6 +++++-
 4 files changed, 16 insertions(+), 34 deletions(-)
---
diff --git a/t/zz-GtkImage.t b/t/zz-GtkImage.t
index 859ac67..0317bbb 100644
--- a/t/zz-GtkImage.t
+++ b/t/zz-GtkImage.t
@@ -10,37 +10,7 @@ use warnings;
 
 plan tests => 36;
 
-# borrowed from xsane-icons.c
-my @pixbuf_data =
-(
-        "    20    20        4            1",
-        "  none",
-        ". c #000000",
-        "+ c #208020",
-        "a c #ffffff",
-        "                    ",
-        " .................  ",
-        " .+++++++++++++++.  ",
-        " .+      .      +.  ",
-        " .+     ...     +.  ",
-        " .+    . . .    +.  ",
-        " .+      .      +.  ",
-        " .+      .      +.  ",
-        " .+  .   .   .  +.  ",
-        " .+ .    .    . +.  ",
-        " .+.............+.  ",
-        " .+ .    .    . +.  ",
-        " .+  .   .   .  +.  ",
-        " .+      .      +.  ",
-        " .+    . . .    +.  ",
-        " .+     ...     +.  ",
-        " .+      .      +.  ",
-        " .+++++++++++++++.  ",
-        " .................  ",
-        "                    ",
-);
-
-my $pixbuf = Gtk3::Gdk::Pixbuf->new_from_xpm_data (@pixbuf_data);
+my $pixbuf = Gtk3::Gdk::Pixbuf->new ('rgb', Glib::TRUE, 8, 10, 10);
 
 # Plain old new ################################################################
 
diff --git a/t/zz-GtkRadioButton.t b/t/zz-GtkRadioButton.t
index 4747a76..2c30791 100644
--- a/t/zz-GtkRadioButton.t
+++ b/t/zz-GtkRadioButton.t
@@ -5,7 +5,11 @@ BEGIN { require './t/inc/setup.pl' }
 use strict;
 use warnings;
 
-plan tests => 11;
+if (Gtk3::CHECK_VERSION (3, 2, 0)) {
+  plan tests => 11;
+} else {
+  plan skip_all => 'GtkRadioButton was not properly annotated in gtk+ < 3.2';
+}
 
 {
   my $item_one = Gtk3::RadioButton -> new();
diff --git a/t/zz-GtkRadioMenuItem.t b/t/zz-GtkRadioMenuItem.t
index 7d3819c..bb294f0 100644
--- a/t/zz-GtkRadioMenuItem.t
+++ b/t/zz-GtkRadioMenuItem.t
@@ -7,7 +7,11 @@ BEGIN { require './t/inc/setup.pl' }
 use strict;
 use warnings;
 
-plan tests => 12;
+if (Gtk3::CHECK_VERSION (3, 4, 0)) {
+  plan tests => 12;
+} else {
+  plan skip_all => 'GtkRadioMenuItem was not properly annotated in gtk+ < 3.4';
+}
 
 {
   my $item_one = Gtk3::RadioMenuItem -> new();
diff --git a/t/zz-GtkRadioToolButton.t b/t/zz-GtkRadioToolButton.t
index 29206b2..b051862 100644
--- a/t/zz-GtkRadioToolButton.t
+++ b/t/zz-GtkRadioToolButton.t
@@ -7,7 +7,11 @@ BEGIN { require './t/inc/setup.pl' }
 use strict;
 use warnings;
 
-plan tests => 12;
+if (Gtk3::CHECK_VERSION (3, 4, 0)) {
+  plan tests => 12;
+} else {
+  plan skip_all => 'GtkRadioToolButton was not properly annotated in gtk+ < 3.4';
+}
 
 my $item = Gtk3::RadioToolButton -> new();
 isa_ok($item, "Gtk3::RadioToolButton");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]