mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-24 09:58:54 +02:00
test repeated g_hash_table_remove_all calls
I just came across a situation where code ended up stuck in an infinite loop in GHashTable code, so lets verify that this is a safe thing.
This commit is contained in:
@@ -823,6 +823,10 @@ test_remove_all (void)
|
||||
g_assert_cmpint (destroy_counter, ==, 2);
|
||||
g_assert_cmpint (destroy_key_counter, ==, 2);
|
||||
|
||||
g_hash_table_remove_all (h);
|
||||
g_assert_cmpint (destroy_counter, ==, 2);
|
||||
g_assert_cmpint (destroy_key_counter, ==, 2);
|
||||
|
||||
g_hash_table_unref (h);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user