mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 05:03:32 +00:00
common-prefix-test: use g_list_prepend
List order does not matter, use faster g_list_prepend().
This commit is contained in:
parent
75173a1f98
commit
029df37f63
1 changed files with 3 additions and 3 deletions
|
@ -208,7 +208,7 @@ test_many_strings (void)
|
|||
for (i = 0; i < 500; ++i)
|
||||
{
|
||||
filename = g_strdup_printf ("we are no longer the knights who say nii%d", i);
|
||||
list = g_list_append (list, filename);
|
||||
list = g_list_prepend (list, filename);
|
||||
}
|
||||
|
||||
actual = nautilus_get_common_filename_prefix_from_filenames (list, 4);
|
||||
|
@ -235,7 +235,7 @@ test_many_strings_last_differs (void)
|
|||
filename[2] = 'X';
|
||||
}
|
||||
|
||||
list = g_list_append (list, filename);
|
||||
list = g_list_prepend (list, filename);
|
||||
}
|
||||
|
||||
actual = nautilus_get_common_filename_prefix_from_filenames (list, 4);
|
||||
|
@ -262,7 +262,7 @@ test_many_strings_first_differs (void)
|
|||
filename[2] = 'X';
|
||||
}
|
||||
|
||||
list = g_list_append (list, filename);
|
||||
list = g_list_prepend (list, filename);
|
||||
}
|
||||
|
||||
actual = nautilus_get_common_filename_prefix_from_filenames (list, 4);
|
||||
|
|
Loading…
Reference in a new issue