[perl-Gtk3] Test that loading Gtk3 multiple times does not affect vfunc overloading
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk3] Test that loading Gtk3 multiple times does not affect vfunc overloading
- Date: Wed, 22 Jul 2015 13:16:51 +0000 (UTC)
commit edc061ec863828ca801d9183299de0978d60f192
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Wed Jul 22 15:09:24 2015 +0200
Test that loading Gtk3 multiple times does not affect vfunc overloading
This issue was fixed in Glib::Object::Introspection recently but cannot be
tested there easily, so we do it here.
The test is only run if G:O:I is new enough.
t/{vfuncs.t => vfuncs-destroy.t} | 0
t/vfuncs-double-setup.t | 38 ++++++++++++++++++++++++++++++++++++++
2 files changed, 38 insertions(+), 0 deletions(-)
---
diff --git a/t/vfuncs.t b/t/vfuncs-destroy.t
similarity index 100%
rename from t/vfuncs.t
rename to t/vfuncs-destroy.t
diff --git a/t/vfuncs-double-setup.t b/t/vfuncs-double-setup.t
new file mode 100644
index 0000000..1f4b084
--- /dev/null
+++ b/t/vfuncs-double-setup.t
@@ -0,0 +1,38 @@
+#!perl
+
+# Ensure that importing Gtk3 multiple times does not break vfunc overloading.
+
+package MyButton;
+
+use strict;
+use warnings;
+
+# First import.
+use Gtk3;
+
+use Glib::Object::Subclass
+ Gtk3::Button::,
+ signals => {},
+ properties => [],
+ ;
+
+package main;
+
+use strict;
+use warnings;
+
+# Second import.
+use Gtk3 -init;
+
+use Test::More;
+if (!eval { Glib::Object::Introspection->VERSION ('0.030') }) {
+ plan skip_all => 'G:O:I 0.030 required';
+} else {
+ plan tests => 1;
+}
+
+my $window = Gtk3::Window->new();
+$window->signal_connect(delete_event => sub { Gtk3->main_quit() });
+my $my_button = MyButton->new(label => "Test");
+$window->add($my_button);
+pass;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]