[next] telepathy-glib: test-connection-error: don't check errors twice
Guillaume Desmottes
gdesmott at kemper.freedesktop.org
Mon May 26 05:13:58 PDT 2014
Module: telepathy-glib
Branch: next
Commit: e01067b4cb9b31e562b656e3af32e26b46fcb36f
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=e01067b4cb9b31e562b656e3af32e26b46fcb36f
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Wed May 21 10:54:22 2014 +0200
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 bf8ecaf..146eca1 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
More information about the telepathy-commits
mailing list