perl-GStreamer r108 - in trunk: . t



Author: tsch
Date: Sat Feb 21 15:39:26 2009
New Revision: 108
URL: http://svn.gnome.org/viewvc/perl-GStreamer?rev=108&view=rev

Log:
Make the clock resolution and master clock tests more robust.


Modified:
   trunk/ChangeLog
   trunk/t/GstClock.t

Modified: trunk/t/GstClock.t
==============================================================================
--- trunk/t/GstClock.t	(original)
+++ trunk/t/GstClock.t	Sat Feb 21 15:39:26 2009
@@ -19,8 +19,8 @@
   skip 'failed to find a clock', 20
     unless defined $clock;
 
-  is($clock -> set_resolution(1000), 0);
-  is($clock -> get_resolution(), 1000);
+  ok(defined $clock -> set_resolution(1000));
+  ok(defined $clock -> get_resolution());
 
   ok($clock -> get_time() >= 0);
 
@@ -28,14 +28,18 @@
   is_deeply([$clock -> get_calibration()], [0, 2, 3, 4]);
 
   SKIP: {
-    skip "master clock tests", 2
-      unless undef; # FIXME
-
     my $master_element = GStreamer::ElementFactory -> make("alsamixer", "sink");
-    my $master = $element -> provide_clock();
 
-    ok($clock -> set_master($master));
-    is($clock -> get_master(), $master);
+    skip "master clock tests: couldn't find master element", 2
+      unless defined $master_element;
+
+    my $master_clock = $master_element -> provide_clock();
+
+    skip "master clock tests: couldn't find master clock", 2
+      unless defined $master_clock;
+
+    ok($clock -> set_master($master_clock));
+    is($clock -> get_master(), $master_clock);
   }
 
   my ($result, $r) = $clock -> add_observation(23, 42);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]