summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore_thread_eina_thread_queue.c
diff options
context:
space:
mode:
authorVivek Ellur <vivek.ellur@samsung.com>2015-10-12 12:09:04 -0700
committerCedric BAIL <cedric@osg.samsung.com>2015-10-12 14:01:23 -0700
commit4f604e4d1ee0d32d48d13676f2aef514b47c4885 (patch)
tree00e583df780d5bc183f98a0130e4041dc99a30f4 /src/tests/ecore/ecore_test_ecore_thread_eina_thread_queue.c
parentb2fb58b91595938722be37e131c67228235a82bf (diff)
eina_queue: add test cases in eina thread queue module
Summary: Added test cases for eina_thread_queue_parent_get and eina_thread_queue_fd_get functions Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com> Reviewers: cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3165 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to '')
-rw-r--r--src/tests/ecore/ecore_test_ecore_thread_eina_thread_queue.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/tests/ecore/ecore_test_ecore_thread_eina_thread_queue.c b/src/tests/ecore/ecore_test_ecore_thread_eina_thread_queue.c
index 616cb72eb8..d5bdc27f8f 100644
--- a/src/tests/ecore/ecore_test_ecore_thread_eina_thread_queue.c
+++ b/src/tests/ecore/ecore_test_ecore_thread_eina_thread_queue.c
@@ -196,6 +196,8 @@ th22_do(void *data EINA_UNUSED, Ecore_Thread *th EINA_UNUSED)
196START_TEST(ecore_test_ecore_thread_eina_thread_queue_t3) 196START_TEST(ecore_test_ecore_thread_eina_thread_queue_t3)
197{ 197{
198 int val1 = 99, val2 = 99, cnt = 0; 198 int val1 = 99, val2 = 99, cnt = 0;
199 Eina_Thread_Queue *parent;
200
199 eina_init(); 201 eina_init();
200 ecore_init(); 202 ecore_init();
201 203
@@ -204,6 +206,12 @@ START_TEST(ecore_test_ecore_thread_eina_thread_queue_t3)
204 thqmaster = eina_thread_queue_new(); 206 thqmaster = eina_thread_queue_new();
205 eina_thread_queue_parent_set(thq1, thqmaster); 207 eina_thread_queue_parent_set(thq1, thqmaster);
206 eina_thread_queue_parent_set(thq2, thqmaster); 208 eina_thread_queue_parent_set(thq2, thqmaster);
209
210 parent = eina_thread_queue_parent_get(thq1);
211 fail_if(parent != thqmaster);
212 parent = eina_thread_queue_parent_get(thq2);
213 fail_if(parent != thqmaster);
214
207 ecore_thread_feedback_run(th21_do, NULL, NULL, NULL, NULL, EINA_TRUE); 215 ecore_thread_feedback_run(th21_do, NULL, NULL, NULL, NULL, EINA_TRUE);
208 ecore_thread_feedback_run(th22_do, NULL, NULL, NULL, NULL, EINA_TRUE); 216 ecore_thread_feedback_run(th22_do, NULL, NULL, NULL, NULL, EINA_TRUE);
209 for (;;) 217 for (;;)
@@ -546,7 +554,7 @@ START_TEST(ecore_test_ecore_thread_eina_thread_queue_t7)
546{ 554{
547 Msg7 *msg; 555 Msg7 *msg;
548 void *ref; 556 void *ref;
549 int msgcnt = 0; 557 int msgcnt = 0, ret;
550 558
551 eina_init(); 559 eina_init();
552 ecore_init(); 560 ecore_init();
@@ -558,6 +566,10 @@ START_TEST(ecore_test_ecore_thread_eina_thread_queue_t7)
558 fail(); 566 fail();
559 } 567 }
560 eina_thread_queue_fd_set(thq1, p[1]); 568 eina_thread_queue_fd_set(thq1, p[1]);
569
570 ret = eina_thread_queue_fd_get(thq1);
571 fail_if(ret != p[1]);
572
561 ecore_thread_feedback_run(thspeed21_do, NULL, NULL, NULL, NULL, EINA_TRUE); 573 ecore_thread_feedback_run(thspeed21_do, NULL, NULL, NULL, NULL, EINA_TRUE);
562 for (;;) 574 for (;;)
563 { 575 {