forked from enlightenment/efl
eina_test_list: Move fail_if out of the hot path
fail_if() from libcheck always writes to a file created with tmpfile(), so it is not a good idea to call it millions of times. This wastes memory and time, let's use both for something better. :-) Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
This commit is contained in:
parent
57208fd2a3
commit
07b5c33f90
|
@ -416,7 +416,11 @@ START_TEST(eina_test_shuffle)
|
|||
j = 0;
|
||||
list = eina_list_sort(list, 0, (Eina_Compare_Cb)&uicmp);
|
||||
EINA_LIST_FOREACH(list, item, p)
|
||||
{
|
||||
if (*p != j++)
|
||||
fail_if(*p != j++);
|
||||
}
|
||||
if (j != SHUFFLE_SZ)
|
||||
fail_if(j != SHUFFLE_SZ);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue