From fc0e71e9781c645118f012ba9d918cbcbd37fb55 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 21 May 2014 10:54:22 +0200 Subject: [PATCH 9/9] test-connection-error: don't check errors twice We are already using g_assert_error() to check those. https://bugs.freedesktop.org/show_bug.cgi?id=79006 --- tests/dbus/connection-error.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tests/dbus/connection-error.c b/tests/dbus/connection-error.c index 16fd4ce..fb57f71 100644 --- a/tests/dbus/connection-error.c +++ b/tests/dbus/connection-error.c @@ -152,11 +152,7 @@ test_registered_error (Test *test, g_variant_unref (asv); g_free (str); - g_assert_cmpstr (g_quark_to_string (error->domain), ==, - g_quark_to_string (example_com_error_quark ())); - g_assert_cmpuint (error->code, ==, DOMAIN_SPECIFIC_ERROR); - g_error_free (error); - error = NULL; + g_clear_error (&error); } static void @@ -283,11 +279,7 @@ test_detailed_error (Test *test, g_assert (ok); g_assert_cmpint (bees, ==, 2342); - g_assert_cmpstr (g_quark_to_string (error->domain), ==, - g_quark_to_string (example_com_error_quark ())); - g_assert_cmpuint (error->code, ==, DOMAIN_SPECIFIC_ERROR); - g_error_free (error); - error = NULL; + g_clear_error (&error); } int -- 1.9.0