jaehyun pushed a commit to branch master.

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

commit bc9ffbebb0e2d62b1793e9acf11bd7e36b39e8e9
Author: Bowon Ryu <[email protected]>
Date:   Wed Oct 10 18:05:18 2018 +0900

    efl_ui_tab_pager: modified test for regression test
    
    Summary: Fixed randomly generated tab items to be generated sequentially in 
test code.
    
    Test Plan: elementary_test -to efl.ui.tab_pager
    
    Reviewers: Jaehyun_Cho, jsuya
    
    Reviewed By: jsuya
    
    Subscribers: cedric, #reviewers, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D7154
---
 src/bin/elementary/test_ui_tab_pager.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/bin/elementary/test_ui_tab_pager.c 
b/src/bin/elementary/test_ui_tab_pager.c
index 50fa6655bd..a9559efe28 100644
--- a/src/bin/elementary/test_ui_tab_pager.c
+++ b/src/bin/elementary/test_ui_tab_pager.c
@@ -3,7 +3,6 @@
 #endif
 #include <Elementary.h>
 
-#define TAB_PAGE_NUM 5
 #define TAB_LABEL_COUNT 15
 #define TAB_ICON_COUNT 9
 
@@ -23,6 +22,9 @@ typedef struct _Tab_Change_Data {
    Eo *icon_check;
 } Tab_Change_Data;
 
+static int tab_label_count;
+static int tab_icon_count;
+
 static void _current_cb(void *data, Evas_Object *obj, void *event_info);
 static void _pack_cb(void *data, Evas_Object *obj, void *event_info);
 static void _unpack_cb(void *data, Evas_Object *obj, void *event_info);
@@ -44,14 +46,14 @@ static char *tab_icons[] = {
 
 static char *tab_label_get()
 {
-       int index = rand() % (TAB_LABEL_COUNT - 1);
-       return tab_labels[index];
+       if (tab_label_count == TAB_LABEL_COUNT) tab_label_count = 0;
+       return tab_labels[tab_label_count++];
 }
 
 static char *tab_icon_get()
 {
-       int index = rand() % (TAB_ICON_COUNT - 1);
-       return tab_icons[index];
+       if (tab_icon_count == TAB_ICON_COUNT) tab_icon_count = 0;
+       return tab_icons[tab_icon_count++];
 }
 
 static void
@@ -157,6 +159,9 @@ test_ui_tab_pager(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *ev
    efl_ui_pager_transition_set(tp, tran);
 */
 
+   tab_label_count = 0;
+   tab_icon_count = 0;
+
    for (i = 0 ; i < 3 ; i ++)
    {
       page = tab_page_add(tp);

-- 


Reply via email to