mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 06:26:15 +01:00
tests: Fix array length calculations in array tests
Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
b4943aa360
commit
625055f60e
@ -508,8 +508,9 @@ array_copy (gconstpointer test_data)
|
||||
/* Check internal parameters ('clear' flag) */
|
||||
if (config->clear_)
|
||||
{
|
||||
g_array_set_size (array_copy, array_copy->len + 5);
|
||||
for (i = array_copy->len; i < array_copy->len + 5; i++)
|
||||
guint old_length = array_copy->len;
|
||||
g_array_set_size (array_copy, old_length + 5);
|
||||
for (i = old_length; i < old_length + 5; i++)
|
||||
g_assert_cmpint (g_array_index (array_copy, gint, i), ==, 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user