[perl-Gtk2/stable-1-22] Fix test failures in GtkAction.t
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk2/stable-1-22] Fix test failures in GtkAction.t
- Date: Sun, 30 May 2010 21:14:35 +0000 (UTC)
commit 2051415378ecb8ef64537595d8416dc93079e58a
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Sun Apr 11 15:58:58 2010 +0200
Fix test failures in GtkAction.t
Don't make assumptions about the number of proxies associated with the
action.
t/GtkAction.t | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/t/GtkAction.t b/t/GtkAction.t
index 9e4f0f7..1374eec 100644
--- a/t/GtkAction.t
+++ b/t/GtkAction.t
@@ -5,7 +5,7 @@
use Gtk2::TestHelper
at_least_version => [2, 4, 0, "Action-based menus are new in 2.4"],
- tests => 19, noinit => 0;
+ tests => 17, noinit => 0;
my $action = Gtk2::Action->new (name => 'Open',
label => '_Open',
@@ -37,17 +37,11 @@ isa_ok ($widget, 'Gtk2::MenuItem');
$widget = $action->create_tool_item;
isa_ok ($widget, 'Gtk2::ToolItem');
-my @proxies = $action->get_proxies;
-is (@proxies, 1);
-
my $proxy = Gtk2::Button->new;
$action->connect_proxy ($proxy);
- proxies = $action->get_proxies;
-is (@proxies, 2);
-
+my @proxies = $action->get_proxies;
+ok (grep {$_ == $proxy} @proxies);
$action->disconnect_proxy ($proxy);
- proxies = $action->get_proxies;
-is (@proxies, 1);
$action->connect_accelerator;
$action->disconnect_accelerator;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]