[next] telepathy-glib: tp_tests_create_conn: improve assertion message
Simon McVittie
smcv at kemper.freedesktop.org
Fri Mar 14 12:02:33 PDT 2014
Module: telepathy-glib
Branch: next
Commit: 4226e51dd706cd875da0dc240bb7ab3949cec8f6
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=4226e51dd706cd875da0dc240bb7ab3949cec8f6
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Tue Mar 11 18:27:41 2014 +0000
tp_tests_create_conn: improve assertion message
g_assert_no_error() is better to put first.
---
tests/lib/util.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/lib/util.c b/tests/lib/util.c
index 7f23fd4..f1c0fc4 100644
--- a/tests/lib/util.c
+++ b/tests/lib/util.c
@@ -265,6 +265,7 @@ tp_tests_create_conn (GType conn_type,
gchar *name;
gchar *conn_path;
GError *error = NULL;
+ gboolean ok;
g_assert (service_conn != NULL);
g_assert (client_conn != NULL);
@@ -278,9 +279,10 @@ tp_tests_create_conn (GType conn_type,
NULL);
g_assert (*service_conn != NULL);
- g_assert (tp_base_connection_register (*service_conn, "simple",
- &name, &conn_path, &error));
+ ok = tp_base_connection_register (*service_conn, "simple",
+ &name, &conn_path, &error);
g_assert_no_error (error);
+ g_assert (ok);
*client_conn = tp_tests_connection_new (dbus, NULL, conn_path, &error);
g_assert (*client_conn != NULL);
More information about the telepathy-commits
mailing list