[vlc-devel] commit: failing test for libvlc_media_list_player added (Filippo Carone )

git version control git at videolan.org
Sun Jun 29 14:33:49 CEST 2008


vlc | branch: master | Filippo Carone <littlejohn at videolan.org> | Sun Jun 29 14:34:55 2008 +0200| [025d0a239f580936ee53685119daebbc9a09ed13]

failing test for libvlc_media_list_player added

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=025d0a239f580936ee53685119daebbc9a09ed13
---

 test/libvlc/media_list_player.c |   46 ++++++++++++++++++++++++++++++++++++++-
 1 files changed, 45 insertions(+), 1 deletions(-)

diff --git a/test/libvlc/media_list_player.c b/test/libvlc/media_list_player.c
index 948e7b2..712e0fe 100644
--- a/test/libvlc/media_list_player.c
+++ b/test/libvlc/media_list_player.c
@@ -69,12 +69,56 @@ static void test_media_list_player_pause_stop(const char** argv, int argc)
     catch ();
 }
 
+static void test_media_list_player_play_item_at_index(const char** argv, int argc)
+{
+    libvlc_instance_t *vlc;
+    libvlc_media_t *md;
+    libvlc_media_list_t *ml;
+    libvlc_media_list_player_t *mlp;
+
+    const char * file = test_default_sample;
+
+    log ("Testing play and pause of %s using the media list.\n", file);
+
+    libvlc_exception_init (&ex);
+    vlc = libvlc_new (argc, argv, &ex);
+    catch ();
+
+    md = libvlc_media_new (vlc, file, &ex);
+    catch ();
+
+    ml = libvlc_media_list_new (vlc, &ex);
+    catch ();
+
+    mlp = libvlc_media_list_player_new (vlc, &ex);
+
+    libvlc_media_list_add_media( ml, md, &ex );
+    catch ();
+
+    libvlc_media_list_player_set_media_list( mlp, ml, &ex );
+
+    libvlc_media_list_player_play_item_at_index( mlp, 0, &ex );
+    catch ();
+
+    libvlc_media_list_player_stop (mlp, &ex);
+    catch ();
+
+    libvlc_media_release (md);
+    catch ();
+
+    libvlc_media_list_player_release (mlp);
+    catch ();
+
+    libvlc_release (vlc);
+    catch ();
+}
+
 
 int main (void)
 {
     test_init();
 
     test_media_list_player_pause_stop (test_defaults_args, test_defaults_nargs);
-
+    test_media_list_player_play_item_at_index (test_defaults_args, test_defaults_nargs);
     return 0;
 }




More information about the vlc-devel mailing list