tests: Remove assertion that unused buckets should have NULL key/value

We still clear the key/value on removal, but since we're growing the
arrays with realloc() now, we can't guarantee that incoming memory is
cleared. There's no reason it should be either, since we check the
hashes array (which is always in a defined state) before accessing the
other arrays.
This commit is contained in:
Hans Petter Jansson 2018-07-30 15:13:44 +02:00
parent 9986395638
commit eed0f182fd

View File

@ -1414,12 +1414,7 @@ check_data (GHashTable *h)
for (i = 0; i < h->size; i++)
{
if (h->hashes[i] < 2)
{
g_assert (fetch_key_or_value (h->keys, i, h->have_big_keys) == NULL);
g_assert (fetch_key_or_value (h->values, i, h->have_big_values) == NULL);
}
else
if (h->hashes[i] >= 2)
{
g_assert_cmpint (h->hashes[i], ==, h->hash_func (fetch_key_or_value (h->keys, i, h->have_big_keys)));
}