From f7fa1dc04392976357569e546ad57040a9815779 Mon Sep 17 00:00:00 2001 From: "Juan A. Suarez Romero" Date: Fri, 27 Sep 2013 11:28:09 +0000 Subject: tests: Unload plugin after the test This covers the case of deinitializing a plugin --- tests/apple-trailers/test_apple_trailers.c | 13 +++++++++++++ tests/bliptv/test_bliptv.c | 13 +++++++++++++ tests/vimeo/test_vimeo.c | 13 +++++++++++++ 3 files changed, 39 insertions(+) (limited to 'tests') diff --git a/tests/apple-trailers/test_apple_trailers.c b/tests/apple-trailers/test_apple_trailers.c index 809616d..33be3a0 100644 --- a/tests/apple-trailers/test_apple_trailers.c +++ b/tests/apple-trailers/test_apple_trailers.c @@ -35,6 +35,17 @@ test_setup (void) g_assert_no_error (error); } +static void +test_unload (const gchar *plugin_id) +{ + GError *error = NULL; + GrlRegistry *registry; + + registry = grl_registry_get_default (); + grl_registry_unload_plugin (registry, plugin_id, &error); + g_assert_no_error (error); +} + static void verify (GrlData *data, guint n) @@ -157,4 +168,6 @@ main(int argc, char **argv) g_test_add_func ("/apple-trailers/browse/skip", test_browse_skip); return g_test_run (); + + test_unload (APPLE_TRAILERS_ID); } diff --git a/tests/bliptv/test_bliptv.c b/tests/bliptv/test_bliptv.c index 3ada272..15dddfa 100644 --- a/tests/bliptv/test_bliptv.c +++ b/tests/bliptv/test_bliptv.c @@ -37,6 +37,17 @@ test_setup (void) g_assert_no_error (error); } +static void +test_unload (const gchar *plugin_id) +{ + GError *error = NULL; + GrlRegistry *registry; + + registry = grl_registry_get_default (); + grl_registry_unload_plugin (registry, plugin_id, &error); + g_assert_no_error (error); +} + static void test_browse (void) { @@ -274,4 +285,6 @@ main(int argc, char **argv) g_test_add_func ("/bliptv/autosplit", test_autosplit); return g_test_run (); + + test_unload (BLIPTV_ID); } diff --git a/tests/vimeo/test_vimeo.c b/tests/vimeo/test_vimeo.c index 29b4aaf..611f884 100644 --- a/tests/vimeo/test_vimeo.c +++ b/tests/vimeo/test_vimeo.c @@ -47,6 +47,17 @@ test_setup (void) g_assert_no_error (error); } +static void +test_unload (const gchar *plugin_id) +{ + GError *error = NULL; + GrlRegistry *registry; + + registry = grl_registry_get_default (); + grl_registry_unload_plugin (registry, plugin_id, &error); + g_assert_no_error (error); +} + static void test_search_normal (void) { @@ -250,4 +261,6 @@ main (int argc, char **argv) g_test_add_func ("/vimeo/cancel", test_cancel); return g_test_run (); + + test_unload (VIMEO_ID); } -- cgit v1.2.1