From 1c9a4e945dfb07f42b4eff63a0e0ecbeefc1d2c7 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 19 Sep 2012 15:12:50 +0100 Subject: [PATCH 01/15] 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, '@' } = "". --- tests/dbus/contacts.c | 4 ++-- 1 file 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 -- 1.7.10.4