summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGabriel Ivascu <gabrielivascu@gnome.org>2017-09-18 18:22:09 +0300
committerGabriel Ivascu <gabrielivascu@gnome.org>2017-10-03 18:29:53 +0200
commit57218b2a209d91229a6d7e03b2f32be878ac73c5 (patch)
treee7f66e64ba8c62484639f92f2b7d4a80db2a6a24 /tests
parentbf848bd1f1e53146beaea99bb4434a8c9d770ed7 (diff)
downloadepiphany-57218b2a209d91229a6d7e03b2f32be878ac73c5.tar.gz
gsb-utils: Use GBytes for full hashes too
This allows better handling in g_hash_table_new_full() and g_list_copy_deep() due to g_bytes_hash(), g_bytes_equal(), g_bytes_ref(), g_bytes_unref().
Diffstat (limited to 'tests')
-rw-r--r--tests/ephy-gsb-utils-test.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/ephy-gsb-utils-test.c b/tests/ephy-gsb-utils-test.c
index 8c5330d40..f0bc45376 100644
--- a/tests/ephy-gsb-utils-test.c
+++ b/tests/ephy-gsb-utils-test.c
@@ -161,12 +161,13 @@ test_ephy_gsb_utils_compute_hashes (void)
g_assert_cmpuint (g_list_length (hashes), ==, test.num_hashes);
for (guint k = 0; k < test.num_hashes; k++, h = h->next) {
- char *hash_hex = bytes_to_hex (h->data, GSB_HASH_SIZE);
+ char *hash_hex = bytes_to_hex (g_bytes_get_data (h->data, NULL),
+ g_bytes_get_size (h->data));
g_assert_cmpstr (hash_hex, ==, test.hashes_hex[k]);
g_free (hash_hex);
}
- g_list_free_full (hashes, g_free);
+ g_list_free_full (hashes, (GDestroyNotify)g_bytes_unref);
}
}