aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tests/eina/eina_test_safepointer.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/tests/eina/eina_test_safepointer.c b/src/tests/eina/eina_test_safepointer.c
index 543f77e1ec..30f696fde7 100644
--- a/src/tests/eina/eina_test_safepointer.c
+++ b/src/tests/eina/eina_test_safepointer.c
@@ -27,8 +27,8 @@
#include "eina_suite.h"
static int test_array[1024] = { 0, 1, 2, 3, 4, 5, 6, 7 };
-static int test_array2[1024] = { 8, 9, 10, 11, 12, 13, 14 };
-static const void *pointers[2048] = { NULL };
+static int test_array2[64] = { 8, 9, 10, 11, 12, 13, 14 };
+static const void *pointers[1088] = { NULL };
START_TEST(eina_test_reusable)
{
@@ -44,11 +44,6 @@ START_TEST(eina_test_reusable)
fail_if(&test_array[i] != eina_safepointer_get(pointers[i]));
}
- for (i = 0; i < sizeof (test_array) / sizeof (test_array[0]); i++)
- {
- eina_safepointer_unregister(pointers[i]);
- }
-
for (i = 0; i < sizeof (test_array2) / sizeof (test_array2[0]); i++)
{
pointers[i + (sizeof (test_array) / sizeof (test_array[0]))] = eina_safepointer_register(&test_array2[i]);
@@ -58,6 +53,11 @@ START_TEST(eina_test_reusable)
eina_safepointer_unregister(pointers[i + (sizeof (test_array) / sizeof (test_array[0]))]);
}
+ for (i = 0; i < sizeof (test_array) / sizeof (test_array[0]); i++)
+ {
+ eina_safepointer_unregister(pointers[i]);
+ }
+
for (i = 0; i < sizeof (pointers) / sizeof (pointers[0]); i++)
{
unsigned int j;
@@ -89,11 +89,6 @@ _thread1(void *data EINA_UNUSED, Eina_Thread t EINA_UNUSED)
fail_if(&test_array[i] != eina_safepointer_get(pointers[i]));
}
- for (i = 0; i < sizeof (test_array) / sizeof (test_array[0]); i++)
- {
- eina_safepointer_unregister(pointers[i]);
- }
-
return NULL;
}
@@ -135,6 +130,11 @@ START_TEST(eina_test_threading)
eina_thread_join(t1);
eina_thread_join(t2);
+ for (i = 0; i < sizeof (test_array) / sizeof (test_array[0]); i++)
+ {
+ eina_safepointer_unregister(pointers[i]);
+ }
+
eina_barrier_free(&b);
for (i = 0; i < sizeof (pointers) / sizeof (pointers[0]); i++)