aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/elementary
diff options
context:
space:
mode:
authorBowon Ryu <bowon.ryu@samsung.com>2018-10-10 18:05:18 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2018-10-10 18:05:18 +0900
commitbc9ffbebb0e2d62b1793e9acf11bd7e36b39e8e9 (patch)
tree4dca0c94db52bcf09b91636396bc8abe8294032d /src/bin/elementary
parenteolian_suite: Fix reference template for doc (diff)
downloadefl-bc9ffbebb0e2d62b1793e9acf11bd7e36b39e8e9.tar.gz
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
Diffstat (limited to 'src/bin/elementary')
-rw-r--r--src/bin/elementary/test_ui_tab_pager.c15
1 files 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);