[next] telepathy-glib: contacts test: correct comparison of locations
Simon McVittie
smcv at kemper.freedesktop.org
Mon Oct 8 08:23:22 PDT 2012
Module: telepathy-glib
Branch: next
Commit: 51c4234251cc7c263b54803d7c0211db0dc25fa2
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=51c4234251cc7c263b54803d7c0211db0dc25fa2
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Wed Sep 19 15:12:50 2012 +0100
contacts test: correct comparison of locations
The values are GValues, not strings.
This only appeared to work by chance: struct _GValue starts with a GType,
and G_TYPE_STRING is '@', so on little-endian platforms interpreting
a GValue as a string gives { '@', 0, 0, 0 } = "@" and on big-endian
platforms it gives { 0, 0, 0, '@' } = "".
https://bugs.freedesktop.org/show_bug.cgi?id=55095
---
tests/dbus/contacts.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/dbus/contacts.c b/tests/dbus/contacts.c
index 48debb0..c06f5b9 100644
--- a/tests/dbus/contacts.c
+++ b/tests/dbus/contacts.c
@@ -1206,8 +1206,8 @@ upgrade_cb (TpConnection *connection,
G_STMT_START {\
g_assert_cmpuint (g_hash_table_size (left), ==, \
g_hash_table_size (right));\
- g_assert_cmpstr (g_hash_table_lookup (left, "country"), ==,\
- g_hash_table_lookup (right, "country"));\
+ g_assert_cmpstr (tp_asv_get_string (left, "country"), ==,\
+ tp_asv_get_string (right, "country"));\
} G_STMT_END
static void
More information about the telepathy-commits
mailing list