summaryrefslogtreecommitdiff
path: root/tests/contact-search-result.c
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2011-01-28 13:40:05 +0000
committerWill Thompson <will.thompson@collabora.co.uk>2011-01-28 13:42:56 +0000
commit9aaccf6adfddf4d27c9e8a9569894f1ef7f02932 (patch)
tree099761ed4ffef88127066ae4bdb8f21d19e40b75 /tests/contact-search-result.c
parentc952deb73661d91ce2ce74209b0dba191b9bc0aa (diff)
downloadtelepathy-glib-9aaccf6adfddf4d27c9e8a9569894f1ef7f02932.tar.gz
tests/contact-search-result: null-terminate value array
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk> Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Diffstat (limited to 'tests/contact-search-result.c')
-rw-r--r--tests/contact-search-result.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/contact-search-result.c b/tests/contact-search-result.c
index e07205686..5037e8298 100644
--- a/tests/contact-search-result.c
+++ b/tests/contact-search-result.c
@@ -27,7 +27,7 @@ test_contact_search_result (void)
TpContactInfoField *field;
const gchar *identifier;
GList *fields;
- gchar *field_value = "Joe";
+ gchar *field_value[] = { "Joe", NULL };
result = _tp_contact_search_result_new ("id");
g_assert (TP_IS_CONTACT_SEARCH_RESULT (result));
@@ -41,7 +41,7 @@ test_contact_search_result (void)
field = tp_contact_search_result_get_field (result, "fn");
g_assert (field == NULL);
- field = tp_contact_info_field_new ("fn", NULL, &field_value);
+ field = tp_contact_info_field_new ("fn", NULL, field_value);
g_assert (field != NULL);
_tp_contact_search_result_insert_field (result, field);
@@ -51,7 +51,8 @@ test_contact_search_result (void)
field = tp_contact_search_result_get_field (result, "fn");
g_assert (field != NULL);
- g_assert_cmpstr (field->field_value[0], ==, field_value);
+ g_assert_cmpstr (field->field_value[0], ==, field_value[0]);
+ g_assert_cmpstr (field->field_value[1], ==, field_value[1]);
g_object_unref (result);
}