summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJuan A. Suarez Romero <jasuarez@igalia.com>2013-09-27 11:28:09 +0000
committerJuan A. Suarez Romero <jasuarez@igalia.com>2013-09-27 11:28:09 +0000
commitf7fa1dc04392976357569e546ad57040a9815779 (patch)
treebcb1d2201c37c38c06359d4dc536db7412e5ba64 /tests
parent22d3aad33524aae72e22fdbffa8fa496da4eeb25 (diff)
downloadgrilo-plugins-f7fa1dc04392976357569e546ad57040a9815779.tar.gz
tests: Unload plugin after the test
This covers the case of deinitializing a plugin
Diffstat (limited to 'tests')
-rw-r--r--tests/apple-trailers/test_apple_trailers.c13
-rw-r--r--tests/bliptv/test_bliptv.c13
-rw-r--r--tests/vimeo/test_vimeo.c13
3 files changed, 39 insertions, 0 deletions
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
@@ -36,6 +36,17 @@ test_setup (void)
}
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
@@ -38,6 +38,17 @@ test_setup (void)
}
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)
{
GError *error = NULL;
@@ -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
@@ -48,6 +48,17 @@ test_setup (void)
}
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)
{
GError *error = NULL;
@@ -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);
}