From e01067b4cb9b31e562b656e3af32e26b46fcb36f Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 21 May 2014 10:54:22 +0200 Subject: 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 bf8ecaf8a..146eca1ca 100644 --- a/tests/dbus/connection-error.c +++ b/tests/dbus/connection-error.c @@ -214,11 +214,7 @@ test_registered_error (Test *test, "com.example.DomainSpecificError"); g_assert (asv != NULL); - 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 @@ -370,11 +366,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 -- cgit v1.2.1