[perl-Glib-IO] Slightly update some tests
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Glib-IO] Slightly update some tests
- Date: Tue, 31 May 2016 17:05:17 +0000 (UTC)
commit 57a7688b9e0f195a5abee262b8cd86ce08f41697
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Tue Sep 15 22:34:36 2015 +0200
Slightly update some tests
t/cancellable.t | 5 +++--
t/file-enumerator.t | 4 ----
t/file-info.t | 2 +-
t/file.t | 12 ++++--------
4 files changed, 8 insertions(+), 15 deletions(-)
---
diff --git a/t/cancellable.t b/t/cancellable.t
index 97f3cd3..0352fb6 100644
--- a/t/cancellable.t
+++ b/t/cancellable.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 2;
+use Test::More tests => 3;
use Glib::IO;
my $cancellable = Glib::IO::Cancellable->new ();
@@ -14,4 +14,5 @@ sub callback {
$cancellable->cancel ();
eval { $cancellable->set_error_if_cancelled (); };
-ok (defined $@);
+isa_ok ($@, 'Glib::IO::IOErrorEnum');
+is ($ ->value, 'cancelled');
diff --git a/t/file-enumerator.t b/t/file-enumerator.t
index 9b7b282..6fc57f9 100644
--- a/t/file-enumerator.t
+++ b/t/file-enumerator.t
@@ -18,11 +18,7 @@ ok (defined $next_file->get_name ());
my $files = $enumerator->next_files_finish ($res);
is (scalar @{$files}, 2);
-
- {
- local $TODO = 'FIXME: user data does not get through in this case';
is_deeply ($data, [ 'bla', 23 ]);
- }
$loop->quit ();
}
diff --git a/t/file-info.t b/t/file-info.t
index 3809247..bf65fad 100644
--- a/t/file-info.t
+++ b/t/file-info.t
@@ -14,7 +14,7 @@ SKIP: {
skip 'get_attribute_data; not usable currently', 4;
my ($success, $type, $memory, $status) =
$info->get_attribute_data ('standard::type');
- ok ($success); # should get rid of the boolean return
+ ok ($success); # get rid of the boolean return?
is ($type, 'uint32');
is ($memory, undef); # this seems to be garbage right now
is ($status, 'unset');
diff --git a/t/file.t b/t/file.t
index 8a21bea..f15ef86 100644
--- a/t/file.t
+++ b/t/file.t
@@ -11,9 +11,9 @@ use Glib::IO;
{
my $file = Glib::IO::File::new_for_path ('non-existent');
- my $result = eval { $file->read (); 1 };
- ok (!$result);
- ok (defined $@);
+ eval { $file->read () };
+ isa_ok ($@, 'Glib::IO::IOErrorEnum');
+ is ($ ->value, 'not-found');
}
{
@@ -27,11 +27,7 @@ use Glib::IO;
my $info = $file->query_info_finish ($res);
ok (defined $info->get_name ());
ok (defined $info->get_size ());
-
- {
- local $TODO = 'FIXME: user data does not get through in this case';
is_deeply ($data, [ 23, 'bla' ]);
- }
$loop->quit ();
}
@@ -40,7 +36,7 @@ use Glib::IO;
}
SKIP: {
- skip 'FIXME: copy_async with progress callback is broken', 5;
+ skip 'copy_async is not introspectable currently', 5;
my $loop = Glib::MainLoop->new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]