[perl-GStreamer] Fix a GstTypeFindFactory.t failure



commit cd60a704384264feed030a7a19c321e5924869f1
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Sun Feb 28 15:03:34 2010 +0100

    Fix a GstTypeFindFactory.t failure
    
    Some factory's get_caps() might return undef, so check for definedness
    before proceeding.  Fixes RT #51279.

 t/GstTypeFindFactory.t |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/t/GstTypeFindFactory.t b/t/GstTypeFindFactory.t
index d7d0bae..6d226df 100644
--- a/t/GstTypeFindFactory.t
+++ b/t/GstTypeFindFactory.t
@@ -13,4 +13,10 @@ isa_ok($factory, "GStreamer::TypeFindFactory");
 # Can't rely on this returning something != NULL
 my @extensions = $factory -> get_extensions();
 
-isa_ok($factory -> get_caps(), "GStreamer::Caps");
+# This might be undef, too
+my $caps = $factory -> get_caps();
+SKIP: {
+  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]