[grilo-plugins] tests: tmdb: Use g_assert_no_error()



commit f0ccc29e13f45f27e9beabff820d0471ea2517c5
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Nov 14 11:29:20 2012 +0100

    tests: tmdb: Use g_assert_no_error()

 test/test_tmdb_fast_resolution.c |    2 +-
 test/test_tmdb_full_resolution.c |    2 +-
 test/test_tmdb_preconditions.c   |    4 ++--
 test/test_tmdb_utils.c           |    6 +++---
 4 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/test/test_tmdb_fast_resolution.c b/test/test_tmdb_fast_resolution.c
index 9c1a6c9..9249574 100644
--- a/test/test_tmdb_fast_resolution.c
+++ b/test/test_tmdb_fast_resolution.c
@@ -70,7 +70,7 @@ test (void)
                            &error);
 
   /* Fast resolution must not result in an error if the details are missing */
-  g_assert (error == NULL);
+  g_assert_no_error (error);
 
   /* Check if we have everything we need */
   g_assert (compare_floats (grl_media_get_rating (media), 3.8f));
diff --git a/test/test_tmdb_full_resolution.c b/test/test_tmdb_full_resolution.c
index 47398b3..98a451c 100644
--- a/test/test_tmdb_full_resolution.c
+++ b/test/test_tmdb_full_resolution.c
@@ -84,7 +84,7 @@ test (void)
                            grl_source_supported_keys (source),
                            options,
                            &error);
-  g_assert (error == NULL);
+  g_assert_no_error (error);
 
   /* Check if we got everything we need for the fast resolution */
   g_assert (compare_floats (grl_media_get_rating (media), 3.8f));
diff --git a/test/test_tmdb_preconditions.c b/test/test_tmdb_preconditions.c
index ee71a0a..5660ff0 100644
--- a/test/test_tmdb_preconditions.c
+++ b/test/test_tmdb_preconditions.c
@@ -51,7 +51,7 @@ test (void)
 
   /* Check that the plugin didn't even try to resolve data, otherwise the mock
    * file would have resulted in an error */
-  g_assert (error == NULL);
+  g_assert_no_error (error);
 
   g_object_unref (local_media);
 
@@ -76,7 +76,7 @@ test (void)
                            grl_source_supported_keys (source),
                            options,
                            &error);
-  g_assert (error == NULL);
+  g_assert_no_error (error);
 
   g_object_unref (media);
   media = NULL;
diff --git a/test/test_tmdb_utils.c b/test/test_tmdb_utils.c
index 0918c35..20fbb88 100644
--- a/test/test_tmdb_utils.c
+++ b/test/test_tmdb_utils.c
@@ -43,10 +43,10 @@ test_setup_tmdb (void)
 
   registry = grl_registry_get_default ();
   grl_registry_add_config (registry, config, &error);
-  g_assert (error == NULL);
+  g_assert_no_error (error);
 
   grl_registry_load_plugin_by_id (registry, TMDB_PLUGIN_ID, &error);
-  g_assert (error == NULL);
+  g_assert_no_error (error);
 
   source = GRL_SOURCE (grl_registry_lookup_source (registry, TMDB_PLUGIN_ID));
   g_assert (source != NULL);
@@ -67,6 +67,6 @@ test_shutdown_tmdb (void)
 
   registry = grl_registry_get_default ();
   grl_registry_unload_plugin (registry, TMDB_PLUGIN_ID, &error);
-  g_assert (error == NULL);
+  g_assert_no_error (error);
 }
 



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