summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_promise.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-11-07 11:18:37 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-11-07 11:18:37 -0800
commit1f7d96e167328fc2c46b6958b70ea2220d697cd7 (patch)
treea7c0250fd7bd77a8792b12b479899cf4c4776b13 /src/tests/ecore/ecore_test_promise.c
parent5db949196e4696c3e38c88b84741cf71469ccf3a (diff)
ecore: remove Eina_Promise tests.
Diffstat (limited to 'src/tests/ecore/ecore_test_promise.c')
-rw-r--r--src/tests/ecore/ecore_test_promise.c104
1 files changed, 0 insertions, 104 deletions
diff --git a/src/tests/ecore/ecore_test_promise.c b/src/tests/ecore/ecore_test_promise.c
index c7176d2cb0..0d7bcc71ec 100644
--- a/src/tests/ecore/ecore_test_promise.c
+++ b/src/tests/ecore/ecore_test_promise.c
@@ -6,105 +6,6 @@
6#include "ecore_suite.h" 6#include "ecore_suite.h"
7#include <time.h> 7#include <time.h>
8 8
9static void
10_ecore_test_promise_normal_lifetime_cb(void* data EINA_UNUSED, void* value EINA_UNUSED)
11{
12 ecore_main_loop_quit();
13}
14
15static void
16_ecore_test_promise_normal_lifetime_value_set_cb(void* promise_owner)
17{
18 eina_promise_owner_value_set((Eina_Promise_Owner*)promise_owner, NULL, NULL);
19}
20
21START_TEST(ecore_test_promise_normal_lifetime)
22{
23 Eina_Promise_Owner* promise_owner;
24 Eina_Promise* promise;
25
26 ecore_init();
27
28 promise_owner = eina_promise_add();
29
30 promise = eina_promise_owner_promise_get(promise_owner);
31
32 eina_promise_then(promise, &_ecore_test_promise_normal_lifetime_cb, NULL, NULL);
33 ecore_job_add(_ecore_test_promise_normal_lifetime_value_set_cb, promise_owner);
34
35 ecore_main_loop_begin();
36
37 ecore_shutdown();
38}
39END_TEST
40
41START_TEST(ecore_test_promise_normal_lifetime_all)
42{
43 Eina_Promise_Owner* promise_owner;
44 Eina_Promise* first[2] = {NULL, NULL};
45 Eina_Promise* promise;
46
47 ecore_init();
48
49 promise_owner = eina_promise_add();
50 first[0] = eina_promise_owner_promise_get(promise_owner);
51 promise = eina_promise_all(eina_carray_iterator_new((void**)&first[0]));
52
53 eina_promise_then(promise, &_ecore_test_promise_normal_lifetime_cb, NULL, NULL);
54 ecore_job_add(_ecore_test_promise_normal_lifetime_value_set_cb, promise_owner);
55
56 ecore_main_loop_begin();
57
58 ecore_shutdown();
59}
60END_TEST
61
62static void
63_ecore_test_promise_immediate_set_lifetime_cb(void* data EINA_UNUSED, void* value EINA_UNUSED)
64{
65 ecore_main_loop_quit();
66}
67
68START_TEST(ecore_test_promise_immediate_set_lifetime)
69{
70 Eina_Promise_Owner* owner;
71 Eina_Promise* promise;
72
73 ecore_init();
74
75 owner = eina_promise_add();
76 promise = eina_promise_owner_promise_get(owner);
77
78 eina_promise_owner_value_set(owner, NULL, NULL);
79 eina_promise_then(promise, &_ecore_test_promise_immediate_set_lifetime_cb, NULL, NULL);
80
81 ecore_main_loop_begin();
82
83 ecore_shutdown();
84}
85END_TEST
86
87START_TEST(ecore_test_promise_immediate_set_lifetime_all)
88{
89 Eina_Promise_Owner* owner;
90 Eina_Promise* first[2] = {NULL, NULL};
91 Eina_Promise* promise;
92
93 ecore_init();
94
95 owner = eina_promise_add();
96 first[0] = eina_promise_owner_promise_get(owner);
97 promise = eina_promise_all(eina_carray_iterator_new((void**)&first[0]));
98
99 eina_promise_owner_value_set(owner, NULL, NULL);
100 eina_promise_then(promise, &_ecore_test_promise_immediate_set_lifetime_cb, NULL, NULL);
101
102 ecore_main_loop_begin();
103
104 ecore_shutdown();
105}
106END_TEST
107
108typedef struct _Future_Ok Future_Ok; 9typedef struct _Future_Ok Future_Ok;
109struct _Future_Ok 10struct _Future_Ok
110{ 11{
@@ -960,11 +861,6 @@ END_TEST
960 861
961void ecore_test_ecore_promise(TCase *tc) 862void ecore_test_ecore_promise(TCase *tc)
962{ 863{
963 tcase_add_test(tc, ecore_test_promise_normal_lifetime);
964 tcase_add_test(tc, ecore_test_promise_normal_lifetime_all);
965 tcase_add_test(tc, ecore_test_promise_immediate_set_lifetime);
966 tcase_add_test(tc, ecore_test_promise_immediate_set_lifetime_all);
967
968 tcase_add_test(tc, efl_test_promise_future_success); 864 tcase_add_test(tc, efl_test_promise_future_success);
969 tcase_add_test(tc, efl_test_promise_future_cancel); 865 tcase_add_test(tc, efl_test_promise_future_cancel);
970 tcase_add_test(tc, efl_test_promise_future_chain_success); 866 tcase_add_test(tc, efl_test_promise_future_chain_success);