[grilo-plugins] tests: Invoke grl_deinit()



commit 4e4c9606af8918b91f953950234177dced3a394b
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Fri Feb 7 22:36:37 2014 +0000

    tests: Invoke grl_deinit()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710185

 tests/apple-trailers/test_apple_trailers.c   |   13 +------------
 tests/bliptv/test_bliptv.c                   |   13 +------------
 tests/tmdb/test_tmdb_fast_resolution.c       |    6 +++++-
 tests/tmdb/test_tmdb_fast_resolution_by_id.c |    6 +++++-
 tests/tmdb/test_tmdb_full_resolution.c       |    6 +++++-
 tests/tmdb/test_tmdb_missing_configuration.c |    6 +++++-
 tests/tmdb/test_tmdb_preconditions.c         |    6 +++++-
 tests/vimeo/test_vimeo.c                     |   13 +------------
 8 files changed, 28 insertions(+), 41 deletions(-)
---
diff --git a/tests/apple-trailers/test_apple_trailers.c b/tests/apple-trailers/test_apple_trailers.c
index 77f0681..6c6730f 100644
--- a/tests/apple-trailers/test_apple_trailers.c
+++ b/tests/apple-trailers/test_apple_trailers.c
@@ -36,17 +36,6 @@ 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)
 {
@@ -169,7 +158,7 @@ main(int argc, char **argv)
 
   gint result = g_test_run ();
 
-  test_unload (APPLE_TRAILERS_ID);
+  grl_deinit ();
 
   return result;
 }
diff --git a/tests/bliptv/test_bliptv.c b/tests/bliptv/test_bliptv.c
index d3fff9d..16ec6d1 100644
--- a/tests/bliptv/test_bliptv.c
+++ b/tests/bliptv/test_bliptv.c
@@ -38,17 +38,6 @@ 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;
@@ -286,7 +275,7 @@ main(int argc, char **argv)
 
   gint result = g_test_run ();
 
-  test_unload (BLIPTV_ID);
+  grl_deinit ();
 
   return result;
 }
diff --git a/tests/tmdb/test_tmdb_fast_resolution.c b/tests/tmdb/test_tmdb_fast_resolution.c
index a5132a0..2202898 100644
--- a/tests/tmdb/test_tmdb_fast_resolution.c
+++ b/tests/tmdb/test_tmdb_fast_resolution.c
@@ -115,5 +115,9 @@ main(int argc, char **argv)
 
   g_test_add_func ("/tmdb/fast-resolution", test_fast_resolution);
 
-  return g_test_run ();
+  gint result = g_test_run ();
+
+  grl_deinit ();
+
+  return result;
 }
diff --git a/tests/tmdb/test_tmdb_fast_resolution_by_id.c b/tests/tmdb/test_tmdb_fast_resolution_by_id.c
index 02124d7..e177beb 100644
--- a/tests/tmdb/test_tmdb_fast_resolution_by_id.c
+++ b/tests/tmdb/test_tmdb_fast_resolution_by_id.c
@@ -117,5 +117,9 @@ main(int argc, char **argv)
 
   g_test_add_func ("/tmdb/fast-resolution-by-id", test_fast_resolution_by_id);
 
-  return g_test_run ();
+  gint result = g_test_run ();
+
+  grl_deinit ();
+
+  return result;
 }
diff --git a/tests/tmdb/test_tmdb_full_resolution.c b/tests/tmdb/test_tmdb_full_resolution.c
index 9421175..b9676c0 100644
--- a/tests/tmdb/test_tmdb_full_resolution.c
+++ b/tests/tmdb/test_tmdb_full_resolution.c
@@ -174,5 +174,9 @@ main(int argc, char **argv)
 
   g_test_add_func ("/tmdb/full-resolution", test_full_resolution);
 
-  return g_test_run ();
+  gint result = g_test_run ();
+
+  grl_deinit ();
+
+  return result;
 }
diff --git a/tests/tmdb/test_tmdb_missing_configuration.c b/tests/tmdb/test_tmdb_missing_configuration.c
index ad1b486..74fbef4 100644
--- a/tests/tmdb/test_tmdb_missing_configuration.c
+++ b/tests/tmdb/test_tmdb_missing_configuration.c
@@ -88,5 +88,9 @@ main(int argc, char **argv)
 
   g_test_add_func ("/tmdb/missing-configuration", test_missing_configuration);
 
-  return g_test_run ();
+  gint result = g_test_run ();
+
+  grl_deinit ();
+
+  return result;
 }
diff --git a/tests/tmdb/test_tmdb_preconditions.c b/tests/tmdb/test_tmdb_preconditions.c
index cb5c2ca..2d6f866 100644
--- a/tests/tmdb/test_tmdb_preconditions.c
+++ b/tests/tmdb/test_tmdb_preconditions.c
@@ -108,5 +108,9 @@ main(int argc, char **argv)
 
   g_test_add_func ("/tmdb/preconditions", test_preconditions);
 
-  return g_test_run ();
+  gint result = g_test_run ();
+
+  grl_deinit ();
+
+  return result;
 }
diff --git a/tests/vimeo/test_vimeo.c b/tests/vimeo/test_vimeo.c
index 29d2345..b75ab9a 100644
--- a/tests/vimeo/test_vimeo.c
+++ b/tests/vimeo/test_vimeo.c
@@ -48,17 +48,6 @@ 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;
@@ -262,7 +251,7 @@ main (int argc, char **argv)
 
   gint result = g_test_run ();
 
-  test_unload (VIMEO_ID);
+  grl_deinit ();
 
   return result;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]