gengrid TC modified
[framework/uifw/elementary.git] / TC / elm_ts / gengrid / utc_UIFW_elm_gengrid_item_pos_get_func.c
index 50dc22d..49b5906 100644 (file)
@@ -28,7 +28,7 @@ Evas_Object *main_win, *main_bg;
 Evas_Object *test_win, *test_bg;
 Evas_Object *test_eo = NULL;
 Elm_Gengrid_Item_Class gic;
-Elm_Gengrid_Item *item;
+Elm_Object_Item *item;
 
 void _elm_precondition(void);
 static void _win_del(void *data, Evas_Object *obj, void *event_info);
@@ -49,7 +49,7 @@ void _elm_precondition(void)
        evas_object_size_hint_weight_set(main_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 
        evas_object_resize(main_win, 320, 480);
-       evas_object_show(main_win);     
+       evas_object_show(main_win);
 }
 
 static void startup(void);
@@ -69,9 +69,10 @@ enum {
 struct tet_testlist tet_testlist[] = {
        { utc_UIFW_elm_gengrid_item_pos_get_func_01, POSITIVE_TC_IDX },
        { utc_UIFW_elm_gengrid_item_pos_get_func_02, NEGATIVE_TC_IDX },
+       { NULL, 0 }
 };
 
-static Evas_Object * _icon_get(const void *data, Evas_Object *obj, const char *part)
+static Evas_Object * _content_get(void *data, Evas_Object *obj, const char *part)
 {
        if (!strcmp(part, "elm.swallow.icon"))
        {
@@ -81,7 +82,7 @@ static Evas_Object * _icon_get(const void *data, Evas_Object *obj, const char *p
                evas_object_show(icon);
                return icon;
        }
-       
+
        return NULL;
 }
 
@@ -94,12 +95,12 @@ static void startup(void)
        test_win = elm_win_add(NULL, "Page Control", ELM_WIN_BASIC);
        elm_win_title_set(test_win, "Page Control");
        elm_win_autodel_set(test_win, 1);
-       
+
        test_bg = elm_bg_add(test_win);
        elm_win_resize_object_add(test_win, test_bg);
        evas_object_size_hint_weight_set(test_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_show(test_bg);
-       
+
        evas_object_resize(test_win, 480, 800);
        evas_object_show(test_win);
 
@@ -109,13 +110,13 @@ static void startup(void)
        elm_gengrid_horizontal_set(test_eo, EINA_FALSE);
        elm_gengrid_bounce_set(test_eo, EINA_FALSE, EINA_TRUE);
        elm_gengrid_multi_select_set(test_eo, EINA_TRUE);
-       
+
        gic.item_style = "default_grid";
-       gic.func.label_get = NULL;
-       gic.func.icon_get = _icon_get;
-       
+       gic.func.text_get = NULL;
+       gic.func.content_get = _content_get;
+
        item = elm_gengrid_item_append(test_eo, &gic, test_bg, NULL, NULL);
-               
+
        tet_infoline("[[ TET_MSG ]]:: Completing startup");
 }
 
@@ -124,25 +125,25 @@ static void cleanup(void)
        if ( NULL != main_win ) {
                main_win = NULL;
        }
-       
+
        if ( NULL != main_bg ) {
                main_bg = NULL;
        }
-       
+
        if ( NULL != test_win ) {
                test_win = NULL;
        }
-       
+
        if ( NULL != test_bg ) {
                test_bg = NULL;
        }
-       
+
        if ( NULL != test_eo ) {
                test_eo = NULL;
        }
-       
+
        elm_exit();
-       
+
        tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
 }
 
@@ -150,12 +151,12 @@ static void utc_UIFW_elm_gengrid_item_pos_get_func_01(void)
 {
        unsigned int x, y;
        x = -1; y = -1;
-       
+
        elm_gengrid_item_pos_get(item, &x, &y);
-       
+
        TET_CHECK_PASS(-1, x);
        TET_CHECK_PASS(-1, y);
-       
+
        tet_result(TET_PASS);
        tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, elm_gengrid_item_pos_get");
 }
@@ -164,12 +165,12 @@ static void utc_UIFW_elm_gengrid_item_pos_get_func_02(void)
 {
        unsigned int x, y;
        x = -1; y = -1;
-       
+
        elm_gengrid_item_pos_get(NULL, &x, &y);
-       
+
        TET_CHECK_FAIL(-1, x);
        TET_CHECK_FAIL(-1, y);
-       
+
        tet_result(TET_PASS);
        tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, elm_gengrid_item_pos_get");
 }