X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=test%2Flibvlc%2Ftest.h;h=2a6c84b6e85b6fa48dcca730075998b4ddf9727e;hb=b6858433aa498c15b537c9af8d0e9766b89df626;hp=9fe2a0f34d1637a97fd0de5a4d4f11b64b83e4bf;hpb=df61d33b06e2b3cbbe746b2f5a9bea5b370c24ff;p=vlc diff --git a/test/libvlc/test.h b/test/libvlc/test.h index 9fe2a0f34d..2a6c84b6e8 100644 --- a/test/libvlc/test.h +++ b/test/libvlc/test.h @@ -32,26 +32,27 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include +#include #undef NDEBUG #include #include #include +#include #include /********************************************************************* * Some useful global var */ -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 +61,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"; /********************************************************************* @@ -69,35 +71,10 @@ static const char * test_default_sample = "samples/test.sample"; #define log( ... ) printf( "testapi: " __VA_ARGS__ ); -/* test if we have exception */ -static inline bool have_exception (void) -{ - if (libvlc_exception_raised (&ex)) - { - libvlc_exception_clear (&ex); - return true; - } - else - return false; -} - -static inline void catch (void) -{ - if (libvlc_exception_raised (&ex)) - { - fprintf (stderr, "Exception: %s\n", - libvlc_exception_get_message (&ex)); - 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 */