[perl-Glib-IO] Add another Glib::IO::Cancellable test
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Glib-IO] Add another Glib::IO::Cancellable test
- Date: Mon, 3 May 2010 20:50:51 +0000 (UTC)
commit 16f3671d1266390e553cba33668c7bce90da2beb
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Mon May 3 22:49:46 2010 +0200
Add another Glib::IO::Cancellable test
t/cancellable.t | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/t/cancellable.t b/t/cancellable.t
index e3fd506..396e353 100644
--- a/t/cancellable.t
+++ b/t/cancellable.t
@@ -5,9 +5,12 @@ use Test::More tests => 2;
use Glib::IO;
my $cancellable = Glib::IO::Cancellable->new ();
-$cancellable->connect (sub {
+$cancellable->connect (\&callback, [ 23, 'bla' ]);
+sub callback {
my ($data) = @_;
- is ($data->[0], 23);
- is ($data->[1], 'bla');
-}, [ 23, 'bla' ]);
+ is_deeply ($data, [ 23, 'bla' ]);
+}
$cancellable->cancel ();
+
+eval { $cancellable->set_error_if_cancelled (); };
+ok (defined $@);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]