diff --git a/libsecret/test-collection.c b/libsecret/test-collection.c index 0cc9f4d..349935b 100644 --- a/libsecret/test-collection.c +++ b/libsecret/test-collection.c @@ -291,6 +291,7 @@ test_for_alias_load_async (Test *test, result = NULL; } +#define g_assert_cmpstr_free(str1, op, str2) G_STMT_START { char *str = str1; g_assert_cmpstr (str, op, str2); g_free (str); } G_STMT_END static void test_create_sync (Test *test, gconstpointer unused) @@ -304,7 +305,7 @@ test_create_sync (Test *test, g_object_add_weak_pointer (G_OBJECT (collection), (gpointer *)&collection); g_assert (g_str_has_prefix (g_dbus_proxy_get_object_path (G_DBUS_PROXY (collection)), "/org/freedesktop/secrets/collection")); - g_assert_cmpstr (secret_collection_get_label (collection), ==, "Train"); + g_assert_cmpstr_free (secret_collection_get_label (collection), ==, "Train"); g_assert (secret_collection_get_locked (collection) == FALSE); g_object_unref (collection); @@ -332,7 +333,7 @@ test_create_async (Test *test, g_object_add_weak_pointer (G_OBJECT (collection), (gpointer *)&collection); g_assert (g_str_has_prefix (g_dbus_proxy_get_object_path (G_DBUS_PROXY (collection)), "/org/freedesktop/secrets/collection")); - g_assert_cmpstr (secret_collection_get_label (collection), ==, "Train"); + g_assert_cmpstr_free (secret_collection_get_label (collection), ==, "Train"); g_assert (secret_collection_get_locked (collection) == FALSE); g_object_unref (collection);