X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=test%2Flibvlc%2Fcore.c;h=85806310b97cb1f88030d62240391cd118b0c5ae;hb=97c36f8d7f2014921a74c75244860224fef18b74;hp=e9d773c1520d1be43281f701f874da44e739467d;hpb=922aad511a40cf2f14b6a5255fb88835818c301b;p=vlc diff --git a/test/libvlc/core.c b/test/libvlc/core.c index e9d773c152..85806310b9 100644 --- a/test/libvlc/core.c +++ b/test/libvlc/core.c @@ -23,28 +23,57 @@ #include "test.h" +#include + static void test_core (const char ** argv, int argc) { libvlc_instance_t *vlc; - int id; log ("Testing core\n"); - libvlc_exception_init (&ex); - vlc = libvlc_new (argc, argv, &ex); - catch (); + vlc = libvlc_new (argc, argv); + assert (vlc != NULL); libvlc_retain (vlc); libvlc_release (vlc); libvlc_release (vlc); } +static void test_moduledescriptionlist (libvlc_module_description_t *list) +{ + libvlc_module_description_t *module = list; + while ( module ) { + assert (strlen (module->psz_name) ); + assert (strlen (module->psz_shortname) ); + assert (module->psz_longname == NULL || strlen (module->psz_longname)); + assert (module->psz_help == NULL || strlen (module->psz_help)); + module = module->p_next; + } + + libvlc_module_description_list_release (list); +} + +static void test_audiovideofilterlists (const char ** argv, int argc) +{ + libvlc_instance_t *vlc; + + log ("Testing libvlc_(audio|video)_filter_list_get()\n"); + + vlc = libvlc_new (argc, argv); + assert (vlc != NULL); + + test_moduledescriptionlist (libvlc_audio_filter_list_get (vlc)); + test_moduledescriptionlist (libvlc_video_filter_list_get (vlc)); + + libvlc_release (vlc); +} int main (void) { test_init(); test_core (test_defaults_args, test_defaults_nargs); + test_audiovideofilterlists (test_defaults_args, test_defaults_nargs); return 0; }