summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-09-19 15:12:50 +0100
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-26 13:44:09 +0200
commit51c4234251cc7c263b54803d7c0211db0dc25fa2 (patch)
tree1dbae3f088b8b4d3e600e236af21a4e93e1faea6
parentc3ac127197aec474dd8533ad8943262bdd26aac8 (diff)
downloadtelepathy-glib-51c4234251cc7c263b54803d7c0211db0dc25fa2.tar.gz
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
-rw-r--r--tests/dbus/contacts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/dbus/contacts.c b/tests/dbus/contacts.c
index 48debb035..c06f5b97b 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