]> git.sesse.net Git - vlc/blobdiff - test/libvlc/test.h
Replace libvlc_exception_get_message with libvlc_errmsg
[vlc] / test / libvlc / test.h
index 9fe2a0f34d1637a97fd0de5a4d4f11b64b83e4bf..7ac1f202084b2d8cc670228e29b71ef2b35e9454 100644 (file)
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
-#include <vlc/libvlc.h>
+#include <vlc/vlc.h>
 
 #undef NDEBUG
 #include <assert.h>
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdbool.h>
 #include <unistd.h>
 
 
 static libvlc_exception_t ex;
 
 static const char * test_defaults_args[] = {
-    "-vvv",
+    "-v",
     "--ignore-config",
     "-I",
     "dummy",
+    "--no-media-library",
     "--plugin-path=../modules",
     "--vout=dummy",
     "--aout=dummy"
@@ -60,7 +62,8 @@ static const char * test_defaults_args[] = {
 static const int test_defaults_nargs =
     sizeof (test_defaults_args) / sizeof (test_defaults_args[0]);
 
-static const char * test_default_sample = "samples/test.sample";
+/*static const char test_default_sample[] = "samples/test.sample";*/
+static const char test_default_sample[] = SRCDIR"/samples/empty.voc";
 
 
 /*********************************************************************
@@ -85,19 +88,16 @@ static inline void catch (void)
 {
     if (libvlc_exception_raised (&ex))
     {
-         fprintf (stderr, "Exception: %s\n",
-                  libvlc_exception_get_message (&ex));
+         fprintf (stderr, "Exception: %s\n", libvlc_errmsg ());
          abort ();
     }
-
-    assert (libvlc_exception_get_message (&ex) == NULL);
     libvlc_exception_clear (&ex);
 }
 
 static inline void test_init (void)
 {
     (void)test_default_sample; /* This one may not be used */
-    alarm (50); /* Make sure "make check" does not get stuck */
+    alarm (10); /* Make sure "make check" does not get stuck */
 }
 
 #endif /* TEST_H */