[perl-GStreamer] Make a few tests more robust
- From: Torsten SchÃnfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-GStreamer] Make a few tests more robust
- Date: Thu, 5 Apr 2012 20:38:52 +0000 (UTC)
commit b7cc92a8872b9e8144ef5fd87d71a046b0a18d78
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date: Thu Apr 5 22:38:34 2012 +0200
Make a few tests more robust
t/GstRegistry.t | 9 +++++++--
t/GstTypeFindFactory.t | 17 ++++++++++-------
2 files changed, 17 insertions(+), 9 deletions(-)
---
diff --git a/t/GstRegistry.t b/t/GstRegistry.t
index 0650088..d57b249 100644
--- a/t/GstRegistry.t
+++ b/t/GstRegistry.t
@@ -52,8 +52,13 @@ SKIP: {
isa_ok($plugin_feature, "GStreamer::PluginFeature");
}
-isa_ok($registry -> find_plugin("volume"), "GStreamer::Plugin");
-isa_ok($registry -> find_feature("volume", "GStreamer::ElementFactory"), "GStreamer::PluginFeature");
+SKIP: {
+ my $plugin = $registry -> find_plugin("volume");
+ skip 'could not find "volume" plugin', 2
+ unless defined $plugin;
+ isa_ok($plugin, "GStreamer::Plugin");
+ isa_ok($registry -> find_feature("volume", "GStreamer::ElementFactory"), "GStreamer::PluginFeature");
+}
is($registry -> lookup("..."), undef);
is($registry -> lookup_feature("..."), undef);
diff --git a/t/GstTypeFindFactory.t b/t/GstTypeFindFactory.t
index 6d226df..69f210f 100644
--- a/t/GstTypeFindFactory.t
+++ b/t/GstTypeFindFactory.t
@@ -7,15 +7,18 @@ use Test::More tests => 2;
use GStreamer -init;
-my $factory = (GStreamer::TypeFindFactory -> get_list())[0];
-isa_ok($factory, "GStreamer::TypeFindFactory");
+SKIP: {
+ my $factory = (GStreamer::TypeFindFactory -> get_list())[0];
+ skip 'could not find a "type find factory"', 2
+ unless defined $factory;
-# Can't rely on this returning something != NULL
-my @extensions = $factory -> get_extensions();
+ isa_ok($factory, "GStreamer::TypeFindFactory");
-# This might be undef, too
-my $caps = $factory -> get_caps();
-SKIP: {
+ # Can't rely on this returning something != NULL
+ my @extensions = $factory -> get_extensions();
+
+ # This might be undef, too
+ my $caps = $factory -> get_caps();
skip 'get_caps() returned undef', 1
unless defined $caps;
isa_ok($caps, "GStreamer::Caps");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]