[perl-Gtk2] Test that tied objects are handled correctly
- From: Torsten SchÃnfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk2] Test that tied objects are handled correctly
- Date: Wed, 3 Aug 2011 22:40:07 +0000 (UTC)
commit fdd903fee39ef3fc3153a5724e93f1505dac5f9b
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date: Thu Aug 4 00:36:07 2011 +0200
Test that tied objects are handled correctly
Before a recent fix to Glib, when you passed a tied object to some xsub, it
could happen that the object wasn't recognized correctly.
Add this test to Gtk2 because the issue is hard to test in Glib alone.
MANIFEST | 1 +
Makefile.PL | 2 +-
t/tied-objects.t | 14 ++++++++++++++
3 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/MANIFEST b/MANIFEST
index d0680df..92cc9b0 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -347,6 +347,7 @@ t/PangoTabs.t
t/PangoTypes.t
t/set-scroll-adjustments-signal.t
t/signal-chaining.t
+t/tied-objects.t
t/version-checks.t
TODO
tools/fetch_faq.pl
diff --git a/Makefile.PL b/Makefile.PL
index 50f7111..dacf139 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -33,7 +33,7 @@ use Cwd;
our %build_reqs = (
'perl-ExtUtils-Depends' => '0.300',
'perl-ExtUtils-PkgConfig' => '1.030',
- 'perl-Glib' => '1.230',
+ 'perl-Glib' => '1.230', # FIXME: 1.232
'perl-Pango' => '1.220',
'perl-Cairo' => '1.000',
'Gtk+' => '2.0.0',
diff --git a/t/tied-objects.t b/t/tied-objects.t
new file mode 100644
index 0000000..1557b68
--- /dev/null
+++ b/t/tied-objects.t
@@ -0,0 +1,14 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use Glib qw/:constants/;
+use Gtk2 -init;
+use Tie::Hash;
+use Gtk2::TestHelper tests => 1;
+
+# Make sure a tied Glib::Object is handled normally. Based on a test sent to
+# the list by Terrence Brannon.
+tie my %objects, 'Tie::StdHash';
+my $vbox = Gtk2::VBox->new (FALSE, 0);
+$objects{button} = Gtk2::Button->new ('Quit');
+ok (eval { $vbox->add ($objects{button}); 1 });
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]