[vlc-devel] commit: Cleanup test cases ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Feb 21 17:15:16 CET 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Feb 21 18:14:19 2009 +0200| [0476f4d8bf959b8e6a7a92f13ab6c5e1dc53cc93] | committer: Rémi Denis-Courmont 

Cleanup test cases

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

 bindings/cil/src/media.cs     |    2 +-
 bindings/cil/tests/testvlc.cs |   21 ++++++++++++++-------
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/bindings/cil/src/media.cs b/bindings/cil/src/media.cs
index 18d6b78..39f0290 100644
--- a/bindings/cil/src/media.cs
+++ b/bindings/cil/src/media.cs
@@ -124,7 +124,7 @@ namespace VideoLAN.LibVLC
         /**
          * Duration of the media in microseconds. The precision of the result
          * depends on the input stram protocol and file format. The value
-         * might be incorrect and unknown (VLC usually returns 0 then).
+         * might be incorrect and unknown (VLC usually returns 0 or -1 then).
          */
         public long Duration
         {
diff --git a/bindings/cil/tests/testvlc.cs b/bindings/cil/tests/testvlc.cs
index b0d1c11..1e0c9c2 100644
--- a/bindings/cil/tests/testvlc.cs
+++ b/bindings/cil/tests/testvlc.cs
@@ -28,24 +28,31 @@ namespace VideoLAN.LibVLC.Test
 {
     public sealed class Test
     {
+        private static void DumpMedia (Media m)
+        {
+            Console.WriteLine ("Media at    {0}", m.Location);
+            Console.WriteLine (" duration:  {0}µs", m.Duration);
+            Console.WriteLine (" preparsed: {0}", m.IsPreparsed);
+        }
+
         public static int Main (string[] args)
         {
             string[] argv = new string[]{
-                "-v", "-I", "dummy", "--plugin-path=../../modules"
+                "-vv", "-I", "dummy", "--plugin-path=../../modules"
             };
 
-            Console.WriteLine("Running on VLC {0} ({1})", VLC.Version,
-                            VLC.ChangeSet);
-            Console.WriteLine("Compiled with {0}", VLC.Compiler);
+            Console.WriteLine ("Running on LibVLC {0} ({1})", VLC.Version,
+                               VLC.ChangeSet);
+            Console.WriteLine (" (compiled with {0})", VLC.Compiler);
 
             VLC vlc = new VLC (argv);
             Media m = new Media (vlc, "/dev/null");
+            DumpMedia (m);
 
-            vlc.AddInterface ("qt4");
-            vlc.Run ();
+            DumpMedia ((Media)m.Clone ());
 
-            m.Dispose ();
             vlc.Dispose ();
+            m.Dispose ();
             return 0;
         }
     };




More information about the vlc-devel mailing list