cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7fa841236b38e5816b7f1fc7737a27e09f19a663

commit 7fa841236b38e5816b7f1fc7737a27e09f19a663
Author: Vivek Ellur <vivek.el...@samsung.com>
Date:   Mon Nov 9 16:22:21 2015 -0800

    eina: add test case for eina list search function.
    
    Summary:
    Added test case for eina_list_search_sorted function
    
    Signed-off-by: Vivek Ellur <vivek.el...@samsung.com>
    
    Reviewers: cedric
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D3290
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/tests/eina/eina_test_list.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/tests/eina/eina_test_list.c b/src/tests/eina/eina_test_list.c
index 29d1d51..b23fa87 100644
--- a/src/tests/eina/eina_test_list.c
+++ b/src/tests/eina/eina_test_list.c
@@ -310,6 +310,7 @@ START_TEST(eina_test_sorted_insert)
    int i, count;
    Eina_List *l1, *l2, *itr;
    void *d;
+   int *res, val = 2009;
 
    eina_init();
 
@@ -322,6 +323,12 @@ START_TEST(eina_test_sorted_insert)
    fail_if(l1 == NULL);
    fail_if(!eina_list_sorted_check(l1));
 
+   res = eina_list_search_sorted(l1, eina_int_cmp, &data[7]);
+   fail_if(*res != 1664);
+
+   res = eina_list_search_sorted(l1, eina_int_cmp, &val);
+   fail_if(res != NULL);
+
    l2 = NULL;
    EINA_LIST_FOREACH(l1, itr, d)
    l2 = eina_list_sorted_insert(l2, eina_int_cmp, d);

-- 


Reply via email to