[vlc-devel] commit: media list count unit test added (Filippo Carone )
git version control
git at videolan.org
Sat Mar 15 16:46:35 CET 2008
vlc | branch: master | Filippo Carone <littlejohn at videolan.org> | Sat Mar 15 16:33:48 2008 +0100| [72d148236598b070fbbc03e12a21623d485987e1]
media list count unit test added
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=72d148236598b070fbbc03e12a21623d485987e1
---
.../org/videolan/jvlc/internal/MediaListTest.java | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/bindings/java/core/src/test/java/org/videolan/jvlc/internal/MediaListTest.java b/bindings/java/core/src/test/java/org/videolan/jvlc/internal/MediaListTest.java
index d68e194..9e0096b 100644
--- a/bindings/java/core/src/test/java/org/videolan/jvlc/internal/MediaListTest.java
+++ b/bindings/java/core/src/test/java/org/videolan/jvlc/internal/MediaListTest.java
@@ -74,4 +74,22 @@ public class MediaListTest
libvlc.libvlc_media_list_add_media_descriptor(mediaList, libvlc_media_descriptor , exception);
Assert.assertEquals(0, exception.raised);
}
+
+ @Test
+ public void mediaListCountTest()
+ {
+ libvlc_exception_t exception = new libvlc_exception_t();
+ LibVlcMediaList mediaList = libvlc.libvlc_media_list_new(libvlcInstance, exception);
+ String mrl = this.getClass().getResource("/raffa_voice.ogg").getPath();
+ LibVlcMediaDescriptor libvlc_media_descriptor = libvlc.libvlc_media_descriptor_new(libvlcInstance, mrl, exception);
+ libvlc.libvlc_media_list_add_media_descriptor(mediaList, libvlc_media_descriptor , exception);
+ int result = libvlc.libvlc_media_list_count(mediaList, exception);
+ Assert.assertEquals(1, result);
+ Assert.assertEquals(0, exception.raised);
+
+ libvlc.libvlc_media_list_add_media_descriptor(mediaList, libvlc_media_descriptor , exception);
+ result = libvlc.libvlc_media_list_count(mediaList, exception);
+ Assert.assertEquals(2, result);
+ Assert.assertEquals(0, exception.raised);
+ }
}
More information about the vlc-devel
mailing list