CC ?= gcc
-TARGETS = uts_elm_imageslider_add_test \
- uts_elm_imageslider_add_func
+TARGETS = utc_UIFW_elm_imageslider_add_func \
+ utc_UIFW_elm_imageslider_item_append_func \
+ utc_UIFW_elm_imageslider_item_prepend_func \
+ utc_UIFW_elm_imageslider_item_del_func \
+ utc_UIFW_elm_imageslider_selected_item_get_func \
+ utc_UIFW_elm_imageslider_item_selected_get_func \
+ utc_UIFW_elm_imageslider_item_selected_set_func \
+ utc_UIFW_elm_imageslider_photo_file_get_func \
+ utc_UIFW_elm_imageslider_item_prev_func \
+ utc_UIFW_elm_imageslider_item_next_func \
+ utc_UIFW_elm_imageslider_prev_func \
+ utc_UIFW_elm_imageslider_next_func
+
PKGS = elementary
$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
clean:
- rm -f $(TARGETS)
+ rm -f *~ *.o tet_captured tet_lock $(TARGETS)
/elm_ts/imageslider/utc_UIFW_elm_imageslider_add_func
+/elm_ts/imageslider/utc_UIFW_elm_imageslider_item_append_func
+/elm_ts/imageslider/utc_UIFW_elm_imageslider_item_prepend_func
+/elm_ts/imageslider/utc_UIFW_elm_imageslider_item_del_func
+/elm_ts/imageslider/utc_UIFW_elm_imageslider_selected_item_get_func
+/elm_ts/imageslider/utc_UIFW_elm_imageslider_item_selected_get_func
+/elm_ts/imageslider/utc_UIFW_elm_imageslider_item_selected_set_func
+/elm_ts/imageslider/utc_UIFW_elm_imageslider_photo_file_get_func
+/elm_ts/imageslider/utc_UIFW_elm_imageslider_item_prev_func
+/elm_ts/imageslider/utc_UIFW_elm_imageslider_item_next_func
+/elm_ts/imageslider/utc_UIFW_elm_imageslider_prev_func
+/elm_ts/imageslider/utc_UIFW_elm_imageslider_next_func
#include <tet_api.h>
-
+#include <Elementary.h>
// Definitions
// For checking the result of the positive test case.
struct tet_testlist tet_testlist[] = {
{ utc_UIFW_elm_imageslider_add_func_01, POSITIVE_TC_IDX },
{ utc_UIFW_elm_imageslider_add_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0}
};
-static void startup(void)
+// Declare the global variables
+Evas_Object *main_win, *main_bg;
+Evas_Object *test_win, *test_bg;
+Evas_Object *test_eo = NULL;
+// Declare internal functions
+void _elm_precondition(void);
+static void _win_del(void *data, Evas_Object *obj, void *event_info);
+
+
+// Delete main window
+static void _win_del(void *data, Evas_Object *obj, void *event_info)
{
+ elm_exit();
+}
+
+// Do precondition.
+void _elm_precondition(void)
+{
+ elm_init(0, NULL);
+
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ elm_win_title_set(main_win, "Elementary Unit Test Suite");
+ evas_object_smart_callback_add(main_win, "delete,request", _win_del, NULL);
+ main_bg = elm_bg_add(main_win);
+ evas_object_size_hint_weight_set(main_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(main_win, main_bg);
+ evas_object_show(main_bg);
+
+ // set an initial window size
+ evas_object_resize(main_win, 320, 480);
+ // show the window
+ evas_object_show(main_win);
+
+ //elm_run();
+}
+
+
+// Start up function for each test purpose
+static void
+startup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+
+ // Elm precondition
+ _elm_precondition();
+
+ // Test precondition
+ test_win = elm_win_add(NULL, "Image Silder", ELM_WIN_BASIC);
+ elm_win_title_set(test_win, "Image Slider");
+ 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);
+
+ tet_infoline("[[ TET_MSG ]]:: Completing startup");
}
-static void cleanup(void)
+// Clean up function for each test purpose
+static void
+cleanup()
{
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+
+ // Clean up the used resources.
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ if ( NULL != main_bg ) {
+ evas_object_del(main_bg);
+ main_bg = NULL;
+ }
+
+ if ( NULL != test_win ) {
+ evas_object_del(test_win);
+ test_win = NULL;
+ }
+
+ if ( NULL != test_bg ) {
+ evas_object_del(test_bg);
+ test_bg = NULL;
+ }
+
+ if ( NULL != test_eo ) {
+ evas_object_del(test_eo);
+ test_eo = NULL;
+ }
+
+ // clean up and shut down
+ elm_shutdown(); ;
+
+ tet_infoline("[[ TET_MSG ]]:: ========= TC COMPLETE ========== ");
}
/**
*/
static void utc_UIFW_elm_imageslider_add_func_01(void)
{
- int r = 0;
-
-/*
- r = elm_imageslider_add(...);
-*/
- if (r) {
- tet_infoline("elm_imageslider_add() failed in positive test case");
- tet_result(TET_FAIL);
- return;
- }
+ test_eo = elm_imageslider_add(test_win);
+ TET_CHECK_PASS(NULL, test_eo);
+
tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, An Image Slider is added successfully.");
}
/**
*/
static void utc_UIFW_elm_imageslider_add_func_02(void)
{
- int r = 0;
-
-/*
- r = elm_imageslider_add(...);
-*/
- if (r) {
- tet_infoline("elm_imageslider_add() failed in negative test case");
- tet_result(TET_FAIL);
- return;
- }
+ test_eo = elm_imageslider_add(NULL);
+ TET_CHECK_FAIL(NULL, test_eo);
+
tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, Adding an Image Slider has failed.");
}
--- /dev/null
+#include <tet_api.h>
+#include <Elementary.h>
+
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Elm_Imageslider_Item *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Elm_Imageslider_Item *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_imageslider_item_append_func_01(void);
+static void utc_UIFW_elm_imageslider_item_append_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_UIFW_elm_imageslider_item_append_func_01, POSITIVE_TC_IDX },
+ { utc_UIFW_elm_imageslider_item_append_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0}
+
+};
+
+// Declare the global variables
+Evas_Object *main_win, *main_bg;
+Evas_Object *test_win, *test_bg;
+Evas_Object *test_eo = NULL;
+static char *imageslider_photos_path[] = {
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item1.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item2.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item3.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item4.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item5.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item6.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item7.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item8.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item9.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item10.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item11.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item12.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item13.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item14.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item15.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item16.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item17.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item18.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item19.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item20.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item21.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item22.jpg",
+};
+
+
+// Declare internal functions
+void _elm_precondition(void);
+static void _win_del(void *data, Evas_Object *obj, void *event_info);
+static void _test_cb(void * data, Evas_Object * obj, void * event_info);
+
+// Delete main window
+static void _win_del(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_exit();
+}
+
+// Do precondition.
+void _elm_precondition(void)
+{
+ elm_init(0, NULL);
+
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ elm_win_title_set(main_win, "Elementary Unit Test Suite");
+ evas_object_smart_callback_add(main_win, "delete,request", _win_del, NULL);
+ main_bg = elm_bg_add(main_win);
+ evas_object_size_hint_weight_set(main_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(main_win, main_bg);
+ evas_object_show(main_bg);
+
+ // set an initial window size
+ evas_object_resize(main_win, 320, 480);
+ // show the window
+ evas_object_show(main_win);
+
+ //elm_run();
+}
+
+// Callback function
+static void _test_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ Elm_Imageslider_Item *it = event_info;
+ Elm_Imageslider_Item *sel = elm_imageslider_selected_item_get(obj);
+
+ printf("[[[ DEBUG ]]]::==================================================\n");
+ printf("[[[ DEBUG ]]]::%p %p\n", it, sel);
+ printf("[[[ DEBUG ]]]::PHOTO FILE: %s\n", elm_imageslider_item_photo_file_get(it));
+ printf("[[[ DEBUG ]]]::--------------------------------------------------------\n");
+
+}
+
+// Start up function for each test purpose
+static void
+startup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+
+ // Elm precondition
+ _elm_precondition();
+
+ // Test precondition
+ test_win = elm_win_add(NULL, "Image Silder", ELM_WIN_BASIC);
+ elm_win_title_set(test_win, "Image Slider");
+ 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);
+
+ // Add an Image Slider Widget.
+ test_eo = elm_imageslider_add(test_win);
+
+ tet_infoline("[[ TET_MSG ]]:: Completing startup");
+}
+
+// Clean up function for each test purpose
+static void
+cleanup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+
+ // Clean up the used resources.
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ if ( NULL != main_bg ) {
+ evas_object_del(main_bg);
+ main_bg = NULL;
+ }
+
+ if ( NULL != test_win ) {
+ evas_object_del(test_win);
+ test_win = NULL;
+ }
+
+ if ( NULL != test_bg ) {
+ evas_object_del(test_bg);
+ test_bg = NULL;
+ }
+
+ if ( NULL != test_eo ) {
+ evas_object_del(test_eo);
+ test_eo = NULL;
+ }
+
+ // clean up and shut down
+ elm_shutdown(); ;
+
+ tet_infoline("[[ TET_MSG ]]:: ========= TC COMPLETE ========== ");
+}
+
+
+/**
+ * @brief Positive test case of elm_imageslider_item_append()
+ */
+static void utc_UIFW_elm_imageslider_item_append_func_01(void)
+{
+ Elm_Imageslider_Item *it = NULL;
+
+ tet_infoline("[[ DEBUG :: Positive ]]");
+
+ it = elm_imageslider_item_append(test_eo, imageslider_photos_path[0], _test_cb, NULL);
+ TET_CHECK_PASS(NULL, it);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, An Image Slider item appended successfully.");
+}
+
+/**
+ * @brief Negative test case of ug_init elm_imageslider_item_append()
+ */
+static void utc_UIFW_elm_imageslider_item_append_func_02(void)
+{
+ Elm_Imageslider_Item *it = NULL;
+
+ tet_infoline("[[ DEBUG:: Negative ]]");
+
+ it = elm_imageslider_item_append(NULL, imageslider_photos_path[1], _test_cb, NULL);
+ TET_CHECK_FAIL(NULL, it);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, Appending an Image Slider item has failed.");
+}
--- /dev/null
+#include <tet_api.h>
+#include <Elementary.h>
+
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_imageslider_item_del_func_01(void);
+static void utc_UIFW_elm_imageslider_item_del_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_UIFW_elm_imageslider_item_del_func_01, POSITIVE_TC_IDX },
+ { utc_UIFW_elm_imageslider_item_del_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0}
+};
+
+// Declare the global variables
+Evas_Object *main_win, *main_bg;
+Evas_Object *test_win, *test_bg;
+Evas_Object *test_eo;
+static char *imageslider_photos_path[] = {
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item1.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item2.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item3.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item4.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item5.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item6.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item7.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item8.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item9.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item10.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item11.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item12.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item13.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item14.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item15.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item16.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item17.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item18.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item19.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item20.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item21.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item22.jpg",
+};
+
+
+// Declare internal functions
+void _elm_precondition(void);
+static void _win_del(void *data, Evas_Object *obj, void *event_info);
+static void _test_cb(void * data, Evas_Object * obj, void * event_info);
+
+// Do precondition.
+void _elm_precondition(void)
+{
+ elm_init(0, NULL);
+
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ elm_win_title_set(main_win, "Elementary Unit Test Suite");
+ evas_object_smart_callback_add(main_win, "delete,request", _win_del, NULL);
+ main_bg = elm_bg_add(main_win);
+ evas_object_size_hint_weight_set(main_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(main_win, main_bg);
+ evas_object_show(main_bg);
+
+ // set an initial window size
+ evas_object_resize(main_win, 320, 480);
+ // show the window
+ evas_object_show(main_win);
+
+ //elm_run();
+}
+
+// Delete main window
+static void _win_del(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_exit();
+}
+
+// Callback function
+static void _test_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ Elm_Imageslider_Item *it = event_info;
+ Elm_Imageslider_Item *sel = elm_imageslider_selected_item_get(obj);
+
+ printf("[[[ DEBUG ]]]::==================================================\n");
+ printf("[[[ DEBUG ]]]::%p %p\n", it, sel);
+ printf("[[[ DEBUG ]]]::PHOTO FILE: %s\n", elm_imageslider_item_photo_file_get(it));
+ printf("[[[ DEBUG ]]]::--------------------------------------------------------\n");
+
+}
+
+// Start up function for each test purpose
+static void
+startup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+
+ // Elm precondition
+ _elm_precondition();
+
+ // Test precondition
+ test_win = elm_win_add(NULL, "Image Silder", ELM_WIN_BASIC);
+ elm_win_title_set(test_win, "Image Slider");
+ 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);
+
+ // Add an Image Slider Widget.
+ test_eo = elm_imageslider_add(test_win);
+
+ tet_infoline("[[ TET_MSG ]]:: Completing startup");
+}
+
+// Clean up function for each test purpose
+static void
+cleanup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+
+ // Clean up the used resources.
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ if ( NULL != main_bg ) {
+ evas_object_del(main_bg);
+ main_bg = NULL;
+ }
+
+ if ( NULL != test_win ) {
+ evas_object_del(test_win);
+ test_win = NULL;
+ }
+
+ if ( NULL != test_bg ) {
+ evas_object_del(test_bg);
+ test_bg = NULL;
+ }
+
+ if ( NULL != test_eo ) {
+ evas_object_del(test_eo);
+ test_eo = NULL;
+ }
+
+ // clean up and shut down
+ elm_shutdown(); ;
+
+ tet_infoline("[[ TET_MSG ]]:: ========= TC COMPLETE ========== ");
+}
+
+/**
+ * @brief Positive test case of elm_imageslider_item_del()
+ */
+static void utc_UIFW_elm_imageslider_item_del_func_01(void)
+{
+ Elm_Imageslider_Item *it = NULL;
+
+ it = elm_imageslider_item_append(test_eo, imageslider_photos_path[0], _test_cb, NULL);
+
+ // Current return type is "Void", but will change to Bool.
+ elm_imageslider_item_del(it);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, The selected Image Slider item deleted successfully.");
+}
+
+/**
+ * @brief Negative test case of ug_init elm_imageslider_item_del()
+ */
+static void utc_UIFW_elm_imageslider_item_del_func_02(void)
+{
+ // Current return type is "Void", but will change to Bool.
+ elm_imageslider_item_del(NULL);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, Deleting the selected Image Slider item has failed.");
+}
--- /dev/null
+#include <tet_api.h>
+#include <Elementary.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Elm_Imageslider_Item *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Elm_Imageslider_Item *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_imageslider_item_next_func_01(void);
+static void utc_UIFW_elm_imageslider_item_next_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_UIFW_elm_imageslider_item_next_func_01, POSITIVE_TC_IDX },
+ { utc_UIFW_elm_imageslider_item_next_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0}
+};
+
+// Declare the global variables
+Evas_Object *main_win, *main_bg;
+Evas_Object *test_win, *test_bg;
+Evas_Object *test_eo;
+static char *imageslider_photos_path[] = {
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item1.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item2.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item3.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item4.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item5.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item6.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item7.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item8.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item9.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item10.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item11.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item12.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item13.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item14.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item15.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item16.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item17.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item18.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item19.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item20.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item21.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item22.jpg",
+};
+
+
+// Declare internal functions
+void _elm_precondition(void);
+static void _win_del(void *data, Evas_Object *obj, void *event_info);
+static void _test_cb(void * data, Evas_Object * obj, void * event_info);
+
+// Do precondition.
+void _elm_precondition(void)
+{
+ elm_init(0, NULL);
+
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ elm_win_title_set(main_win, "Elementary Unit Test Suite");
+ evas_object_smart_callback_add(main_win, "delete,request", _win_del, NULL);
+ main_bg = elm_bg_add(main_win);
+ evas_object_size_hint_weight_set(main_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(main_win, main_bg);
+ evas_object_show(main_bg);
+
+ // set an initial window size
+ evas_object_resize(main_win, 320, 480);
+ // show the window
+ evas_object_show(main_win);
+
+ //elm_run();
+}
+
+// Delete main window
+static void _win_del(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_exit();
+}
+
+// Callback function
+static void _test_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ Elm_Imageslider_Item *it = event_info;
+ Elm_Imageslider_Item *sel = elm_imageslider_selected_item_get(obj);
+
+ printf("[[[ DEBUG ]]]::==================================================\n");
+ printf("[[[ DEBUG ]]]::%p %p\n", it, sel);
+ printf("[[[ DEBUG ]]]::PHOTO FILE: %s\n", elm_imageslider_item_photo_file_get(it));
+ printf("[[[ DEBUG ]]]::--------------------------------------------------------\n");
+
+}
+
+// Start up function for each test purpose
+static void
+startup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+
+ // Elm precondition
+ _elm_precondition();
+
+ // Test precondition
+ test_win = elm_win_add(NULL, "Image Silder", ELM_WIN_BASIC);
+ elm_win_title_set(test_win, "Image Slider");
+ 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);
+
+ // Add an Image Slider Widget.
+ test_eo = elm_imageslider_add(test_win);
+
+ tet_infoline("[[ TET_MSG ]]:: Completing startup");
+}
+
+// Clean up function for each test purpose
+static void
+cleanup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+
+ // Clean up the used resources.
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ if ( NULL != main_bg ) {
+ evas_object_del(main_bg);
+ main_bg = NULL;
+ }
+
+ if ( NULL != test_win ) {
+ evas_object_del(test_win);
+ test_win = NULL;
+ }
+
+ if ( NULL != test_bg ) {
+ evas_object_del(test_bg);
+ test_bg = NULL;
+ }
+
+ if ( NULL != test_eo ) {
+ evas_object_del(test_eo);
+ test_eo = NULL;
+ }
+
+ // clean up and shut down
+ elm_shutdown(); ;
+
+ tet_infoline("[[ TET_MSG ]]:: ========= TC COMPLETE ========== ");
+}
+
+
+/**
+ * @brief Positive test case of elm_imageslider_item_next()
+ */
+static void utc_UIFW_elm_imageslider_item_next_func_01(void)
+{
+ Elm_Imageslider_Item *it = NULL;
+ Elm_Imageslider_Item *next_it = NULL;
+
+ elm_imageslider_item_append(test_eo, imageslider_photos_path[0], _test_cb, NULL);
+ elm_imageslider_item_append(test_eo, imageslider_photos_path[1], _test_cb, NULL);
+ elm_imageslider_item_append(test_eo, imageslider_photos_path[2], _test_cb, NULL);
+
+ it = elm_imageslider_item_append(test_eo, imageslider_photos_path[3], _test_cb, NULL);
+
+ elm_imageslider_item_append(test_eo, imageslider_photos_path[4], _test_cb, NULL);
+
+ next_it = elm_imageslider_item_next(it);
+ TET_CHECK_PASS(NULL, next_it);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, Getting the next Image Slider item has succeed.");
+}
+
+/**
+ * @brief Negative test case of ug_init elm_imageslider_item_next()
+ */
+static void utc_UIFW_elm_imageslider_item_next_func_02(void)
+{
+ Elm_Imageslider_Item *next_it = NULL;
+
+ next_it = elm_imageslider_item_next(NULL);
+ TET_CHECK_FAIL(NULL, next_it);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, Getting the next Image Slider item has failed.");
+}
--- /dev/null
+#include <tet_api.h>
+#include <Elementary.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Elm_Imageslider_Item *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Elm_Imageslider_Item *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_imageslider_item_prev_func_01(void);
+static void utc_UIFW_elm_imageslider_item_prev_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_UIFW_elm_imageslider_item_prev_func_01, POSITIVE_TC_IDX },
+ { utc_UIFW_elm_imageslider_item_prev_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0}
+};
+
+// Declare the global variables
+Evas_Object *main_win, *main_bg;
+Evas_Object *test_win, *test_bg;
+Evas_Object *test_eo;
+static char *imageslider_photos_path[] = {
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item1.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item2.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item3.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item4.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item5.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item6.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item7.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item8.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item9.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item10.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item11.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item12.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item13.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item14.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item15.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item16.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item17.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item18.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item19.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item20.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item21.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item22.jpg",
+};
+
+
+// Declare internal functions
+void _elm_precondition(void);
+static void _win_del(void *data, Evas_Object *obj, void *event_info);
+static void _test_cb(void * data, Evas_Object * obj, void * event_info);
+
+// Do precondition.
+void _elm_precondition(void)
+{
+ elm_init(0, NULL);
+
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ elm_win_title_set(main_win, "Elementary Unit Test Suite");
+ evas_object_smart_callback_add(main_win, "delete,request", _win_del, NULL);
+ main_bg = elm_bg_add(main_win);
+ evas_object_size_hint_weight_set(main_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(main_win, main_bg);
+ evas_object_show(main_bg);
+
+ // set an initial window size
+ evas_object_resize(main_win, 320, 480);
+ // show the window
+ evas_object_show(main_win);
+
+ //elm_run();
+}
+
+// Delete main window
+static void _win_del(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_exit();
+}
+
+// Callback function
+static void _test_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ Elm_Imageslider_Item *it = event_info;
+ Elm_Imageslider_Item *sel = elm_imageslider_selected_item_get(obj);
+
+ printf("[[[ DEBUG ]]]::==================================================\n");
+ printf("[[[ DEBUG ]]]::%p %p\n", it, sel);
+ printf("[[[ DEBUG ]]]::PHOTO FILE: %s\n", elm_imageslider_item_photo_file_get(it));
+ printf("[[[ DEBUG ]]]::--------------------------------------------------------\n");
+
+}
+
+// Start up function for each test purpose
+static void
+startup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+
+ // Elm precondition
+ _elm_precondition();
+
+ // Test precondition
+ test_win = elm_win_add(NULL, "Image Silder", ELM_WIN_BASIC);
+ elm_win_title_set(test_win, "Image Slider");
+ 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);
+
+ // Add an Image Slider Widget.
+ test_eo = elm_imageslider_add(test_win);
+
+ tet_infoline("[[ TET_MSG ]]:: Completing startup");
+}
+
+// Clean up function for each test purpose
+static void
+cleanup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+
+ // Clean up the used resources.
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ if ( NULL != main_bg ) {
+ evas_object_del(main_bg);
+ main_bg = NULL;
+ }
+
+ if ( NULL != test_win ) {
+ evas_object_del(test_win);
+ test_win = NULL;
+ }
+
+ if ( NULL != test_bg ) {
+ evas_object_del(test_bg);
+ test_bg = NULL;
+ }
+
+ if ( NULL != test_eo ) {
+ evas_object_del(test_eo);
+ test_eo = NULL;
+ }
+
+ // clean up and shut down
+ elm_shutdown(); ;
+
+ tet_infoline("[[ TET_MSG ]]:: ========= TC COMPLETE ========== ");
+}
+
+
+
+/**
+ * @brief Positive test case of elm_imageslider_item_prev()
+ */
+static void utc_UIFW_elm_imageslider_item_prev_func_01(void)
+{
+ Elm_Imageslider_Item *it = NULL;
+ Elm_Imageslider_Item *prev_it = NULL;
+
+ elm_imageslider_item_append(test_eo, imageslider_photos_path[0], _test_cb, NULL);
+ elm_imageslider_item_append(test_eo, imageslider_photos_path[1], _test_cb, NULL);
+ elm_imageslider_item_append(test_eo, imageslider_photos_path[2], _test_cb, NULL);
+
+ it = elm_imageslider_item_append(test_eo, imageslider_photos_path[3], _test_cb, NULL);
+
+ prev_it = elm_imageslider_item_prev(it);
+ TET_CHECK_PASS(NULL, prev_it);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, Getting the previous Image Slider item has succeed.");
+}
+
+/**
+ * @brief Negative test case of ug_init elm_imageslider_item_prev()
+ */
+static void utc_UIFW_elm_imageslider_item_prev_func_02(void)
+{
+ Elm_Imageslider_Item *prev_it = NULL;
+
+ prev_it = elm_imageslider_item_prev(NULL);
+ TET_CHECK_FAIL(NULL, prev_it);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, Getting the previous Image Slider item has failed.");
+}
--- /dev/null
+#include <tet_api.h>
+#include <Elementary.h>
+
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Eina_Bool err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Eina_Bool err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_imageslider_item_selected_get_func_01(void);
+static void utc_UIFW_elm_imageslider_item_selected_get_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_UIFW_elm_imageslider_item_selected_get_func_01, POSITIVE_TC_IDX },
+ { utc_UIFW_elm_imageslider_item_selected_get_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0}
+};
+
+// Declare the global variables
+Evas_Object *main_win, *main_bg;
+Evas_Object *test_win, *test_bg;
+Evas_Object *test_eo = NULL;
+static char *imageslider_photos_path[] = {
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item1.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item2.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item3.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item4.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item5.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item6.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item7.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item8.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item9.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item10.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item11.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item12.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item13.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item14.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item15.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item16.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item17.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item18.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item19.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item20.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item21.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item22.jpg",
+};
+
+
+// Declare internal functions
+void _elm_precondition(void);
+static void _win_del(void *data, Evas_Object *obj, void *event_info);
+static void _test_cb(void * data, Evas_Object * obj, void * event_info);
+
+// Do precondition.
+void _elm_precondition(void)
+{
+ elm_init(0, NULL);
+
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ elm_win_title_set(main_win, "Elementary Unit Test Suite");
+ evas_object_smart_callback_add(main_win, "delete,request", _win_del, NULL);
+ main_bg = elm_bg_add(main_win);
+ evas_object_size_hint_weight_set(main_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(main_win, main_bg);
+ evas_object_show(main_bg);
+
+ // set an initial window size
+ evas_object_resize(main_win, 320, 480);
+ // show the window
+ evas_object_show(main_win);
+
+ //elm_run();
+}
+
+// Delete main window
+static void _win_del(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_exit();
+}
+
+// Callback function
+static void _test_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ Elm_Imageslider_Item *it = event_info;
+ Elm_Imageslider_Item *sel = elm_imageslider_selected_item_get(obj);
+
+ printf("[[[ DEBUG ]]]::==================================================\n");
+ printf("[[[ DEBUG ]]]::%p %p\n", it, sel);
+ printf("[[[ DEBUG ]]]::PHOTO FILE: %s\n", elm_imageslider_item_photo_file_get(it));
+ printf("[[[ DEBUG ]]]::--------------------------------------------------------\n");
+
+}
+
+// Start up function for each test purpose
+static void
+startup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+
+ // Elm precondition
+ _elm_precondition();
+
+ // Test precondition
+ test_win = elm_win_add(NULL, "Image Silder", ELM_WIN_BASIC);
+ elm_win_title_set(test_win, "Image Slider");
+ 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);
+
+ // Add an Image Slider Widget.
+ test_eo = elm_imageslider_add(test_win);
+
+ tet_infoline("[[ TET_MSG ]]:: Completing startup");
+}
+
+// Clean up function for each test purpose
+static void
+cleanup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+
+ // Clean up the used resources.
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ if ( NULL != main_bg ) {
+ evas_object_del(main_bg);
+ main_bg = NULL;
+ }
+
+ if ( NULL != test_win ) {
+ evas_object_del(test_win);
+ test_win = NULL;
+ }
+
+ if ( NULL != test_bg ) {
+ evas_object_del(test_bg);
+ test_bg = NULL;
+ }
+
+ if ( NULL != test_eo ) {
+ evas_object_del(test_eo);
+ test_eo = NULL;
+ }
+
+ // clean up and shut down
+ elm_shutdown(); ;
+
+ tet_infoline("[[ TET_MSG ]]:: ========= TC COMPLETE ========== ");
+}
+
+
+/**
+ * @brief Positive test case of elm_imageslider_item_selected_get()
+ */
+static void utc_UIFW_elm_imageslider_item_selected_get_func_01(void)
+{
+ Elm_Imageslider_Item *it = NULL;
+ Eina_Bool rv = EINA_FALSE;
+
+ it = elm_imageslider_item_append(test_eo, imageslider_photos_path[0], _test_cb, NULL);
+ elm_imageslider_item_selected_set(it);
+ it = elm_imageslider_item_append(test_eo, imageslider_photos_path[1], _test_cb, NULL);
+ elm_imageslider_item_selected_set(it);
+ it = elm_imageslider_item_append(test_eo, imageslider_photos_path[2], _test_cb, NULL);
+ elm_imageslider_item_selected_set(it);
+ it = elm_imageslider_item_append(test_eo, imageslider_photos_path[3], _test_cb, NULL);
+ elm_imageslider_item_selected_set(it);
+
+ rv = elm_imageslider_item_selected_get(it);
+ TET_CHECK_PASS(EINA_TRUE, rv);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, The Image Slider item is selected.");
+}
+
+/**
+ * @brief Negative test case of ug_init elm_imageslider_item_selected_get()
+ */
+static void utc_UIFW_elm_imageslider_item_selected_get_func_02(void)
+{
+ Eina_Bool rv = EINA_FALSE;
+
+ rv = elm_imageslider_item_selected_get(NULL);
+ TET_CHECK_FAIL(EINA_FALSE, rv);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, The Image Slider item is not selected.");
+}
--- /dev/null
+#include <tet_api.h>
+#include <Elementary.h>
+
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_imageslider_item_selected_set_func_01(void);
+static void utc_UIFW_elm_imageslider_item_selected_set_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_UIFW_elm_imageslider_item_selected_set_func_01, POSITIVE_TC_IDX },
+ { utc_UIFW_elm_imageslider_item_selected_set_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0}
+};
+
+// Declare the global variables
+Evas_Object *main_win, *main_bg;
+Evas_Object *test_win, *test_bg;
+Evas_Object *test_eo;
+static char *imageslider_photos_path[] = {
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item1.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item2.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item3.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item4.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item5.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item6.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item7.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item8.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item9.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item10.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item11.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item12.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item13.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item14.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item15.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item16.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item17.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item18.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item19.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item20.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item21.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item22.jpg",
+};
+
+
+// Declare internal functions
+void _elm_precondition(void);
+static void _win_del(void *data, Evas_Object *obj, void *event_info);
+static void _test_cb(void * data, Evas_Object * obj, void * event_info);
+
+// Do precondition.
+void _elm_precondition(void)
+{
+ elm_init(0, NULL);
+
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ elm_win_title_set(main_win, "Elementary Unit Test Suite");
+ evas_object_smart_callback_add(main_win, "delete,request", _win_del, NULL);
+ main_bg = elm_bg_add(main_win);
+ evas_object_size_hint_weight_set(main_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(main_win, main_bg);
+ evas_object_show(main_bg);
+
+ // set an initial window size
+ evas_object_resize(main_win, 320, 480);
+ // show the window
+ evas_object_show(main_win);
+
+ //elm_run();
+}
+
+// Delete main window
+static void _win_del(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_exit();
+}
+
+// Callback function
+static void _test_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ Elm_Imageslider_Item *it = event_info;
+ Elm_Imageslider_Item *sel = elm_imageslider_selected_item_get(obj);
+
+ printf("[[[ DEBUG ]]]::==================================================\n");
+ printf("[[[ DEBUG ]]]::%p %p\n", it, sel);
+ printf("[[[ DEBUG ]]]::PHOTO FILE: %s\n", elm_imageslider_item_photo_file_get(it));
+ printf("[[[ DEBUG ]]]::--------------------------------------------------------\n");
+
+}
+
+// Start up function for each test purpose
+static void
+startup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+
+ // Elm precondition
+ _elm_precondition();
+
+ // Test precondition
+ test_win = elm_win_add(NULL, "Image Silder", ELM_WIN_BASIC);
+ elm_win_title_set(test_win, "Image Slider");
+ 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);
+
+ // Add an Image Slider Widget.
+ test_eo = elm_imageslider_add(test_win);
+
+ tet_infoline("[[ TET_MSG ]]:: Completing startup");
+}
+
+// Clean up function for each test purpose
+static void
+cleanup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+
+ // Clean up the used resources.
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ if ( NULL != main_bg ) {
+ evas_object_del(main_bg);
+ main_bg = NULL;
+ }
+
+ if ( NULL != test_win ) {
+ evas_object_del(test_win);
+ test_win = NULL;
+ }
+
+ if ( NULL != test_bg ) {
+ evas_object_del(test_bg);
+ test_bg = NULL;
+ }
+
+ if ( NULL != test_eo ) {
+ evas_object_del(test_eo);
+ test_eo = NULL;
+ }
+
+ // clean up and shut down
+ elm_shutdown(); ;
+
+ tet_infoline("[[ TET_MSG ]]:: ========= TC COMPLETE ========== ");
+}
+
+
+/**
+ * @brief Positive test case of elm_imageslider_item_selected_set()
+ */
+static void utc_UIFW_elm_imageslider_item_selected_set_func_01(void)
+{
+ Elm_Imageslider_Item *it = NULL;
+
+ elm_imageslider_item_append(test_eo, imageslider_photos_path[0], _test_cb, NULL);
+ elm_imageslider_item_append(test_eo, imageslider_photos_path[1], _test_cb, NULL);
+ elm_imageslider_item_append(test_eo, imageslider_photos_path[2], _test_cb, NULL);
+
+ it = elm_imageslider_item_append(test_eo, imageslider_photos_path[3], _test_cb, NULL);
+
+ // Current return type is "Void", but will change to Bool.
+ elm_imageslider_item_selected_set(it);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, Setting the selected Image Slider item has succeed.");
+}
+
+/**
+ * @brief Negative test case of ug_init elm_imageslider_item_selected_set()
+ */
+static void utc_UIFW_elm_imageslider_item_selected_set_func_02(void)
+{
+ // Current return type is "Void", but will change to Bool.
+ elm_imageslider_item_selected_set(NULL);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, Setting the selected Image Slider item has failed.");
+}
--- /dev/null
+#include <tet_api.h>
+#include <Elementary.h>
+
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_imageslider_next_func_01(void);
+static void utc_UIFW_elm_imageslider_next_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_UIFW_elm_imageslider_next_func_01, POSITIVE_TC_IDX },
+ { utc_UIFW_elm_imageslider_next_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0}
+};
+
+// Declare the global variables
+Evas_Object *main_win, *main_bg;
+Evas_Object *test_win, *test_bg;
+Evas_Object *test_eo;
+
+// Declare internal functions
+void _elm_precondition(void);
+static void _win_del(void *data, Evas_Object *obj, void *event_info);
+static void _test_cb(void * data, Evas_Object * obj, void * event_info);
+
+// Do precondition.
+void _elm_precondition(void)
+{
+ elm_init(0, NULL);
+
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ elm_win_title_set(main_win, "Elementary Unit Test Suite");
+ evas_object_smart_callback_add(main_win, "delete,request", _win_del, NULL);
+ main_bg = elm_bg_add(main_win);
+ evas_object_size_hint_weight_set(main_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(main_win, main_bg);
+ evas_object_show(main_bg);
+
+ // set an initial window size
+ evas_object_resize(main_win, 320, 480);
+ // show the window
+ evas_object_show(main_win);
+
+ //elm_run();
+}
+
+// Delete main window
+static void _win_del(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_exit();
+}
+
+// Callback function
+static void _test_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ Elm_Imageslider_Item *it = event_info;
+ Elm_Imageslider_Item *sel = elm_imageslider_selected_item_get(obj);
+
+ printf("[[[ DEBUG ]]]::==================================================\n");
+ printf("[[[ DEBUG ]]]::%p %p\n", it, sel);
+ printf("[[[ DEBUG ]]]::PHOTO FILE: %s\n", elm_imageslider_item_photo_file_get(it));
+ printf("[[[ DEBUG ]]]::--------------------------------------------------------\n");
+
+}
+
+// Start up function for each test purpose
+static void
+startup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+
+ // Elm precondition
+ _elm_precondition();
+
+ // Test precondition
+ test_win = elm_win_add(NULL, "Image Silder", ELM_WIN_BASIC);
+ elm_win_title_set(test_win, "Image Slider");
+ 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);
+
+ // Add an Image Slider Widget.
+ test_eo = elm_imageslider_add(test_win);
+
+ tet_infoline("[[ TET_MSG ]]:: Completing startup");
+}
+
+// Clean up function for each test purpose
+static void
+cleanup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+
+ // Clean up the used resources.
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ if ( NULL != main_bg ) {
+ evas_object_del(main_bg);
+ main_bg = NULL;
+ }
+
+ if ( NULL != test_win ) {
+ evas_object_del(test_win);
+ test_win = NULL;
+ }
+
+ if ( NULL != test_bg ) {
+ evas_object_del(test_bg);
+ test_bg = NULL;
+ }
+
+ if ( NULL != test_eo ) {
+ evas_object_del(test_eo);
+ test_eo = NULL;
+ }
+
+ // clean up and shut down
+ elm_shutdown(); ;
+
+ tet_infoline("[[ TET_MSG ]]:: ============ TC COMPLETE ============ ");
+}
+
+
+/**
+ * @brief Positive test case of elm_imageslider_next()
+ */
+static void utc_UIFW_elm_imageslider_next_func_01(void)
+{
+ // Current return type is "Void", but will change to Bool.
+ elm_imageslider_next(test_eo);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, Moving to the next Image Slider item has succeed.");
+}
+
+/**
+ * @brief Negative test case of ug_init elm_imageslider_next()
+ */
+static void utc_UIFW_elm_imageslider_next_func_02(void)
+{
+ // Current return type is "Void", but will change to Bool.
+ elm_imageslider_next(NULL);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, Moving to the next Image Slider item has failed.");
+}
--- /dev/null
+#include <tet_api.h>
+#include <Elementary.h>
+
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ const char *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ const char *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_imageslider_photo_file_get_func_01(void);
+static void utc_UIFW_elm_imageslider_photo_file_get_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_UIFW_elm_imageslider_photo_file_get_func_01, POSITIVE_TC_IDX },
+ { utc_UIFW_elm_imageslider_photo_file_get_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0}
+};
+
+// Declare the global variables
+Evas_Object *main_win, *main_bg;
+Evas_Object *test_win, *test_bg;
+Evas_Object *test_eo;
+static char *imageslider_photos_path[] = {
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item1.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item2.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item3.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item4.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item5.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item6.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item7.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item8.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item9.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item10.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item11.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item12.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item13.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item14.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item15.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item16.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item17.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item18.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item19.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item20.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item21.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item22.jpg",
+};
+
+
+// Declare internal functions
+void _elm_precondition(void);
+static void _win_del(void *data, Evas_Object *obj, void *event_info);
+static void _test_cb(void * data, Evas_Object * obj, void * event_info);
+
+// Do precondition.
+void _elm_precondition(void)
+{
+ elm_init(0, NULL);
+
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ elm_win_title_set(main_win, "Elementary Unit Test Suite");
+ evas_object_smart_callback_add(main_win, "delete,request", _win_del, NULL);
+ main_bg = elm_bg_add(main_win);
+ evas_object_size_hint_weight_set(main_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(main_win, main_bg);
+ evas_object_show(main_bg);
+
+ // set an initial window size
+ evas_object_resize(main_win, 320, 480);
+ // show the window
+ evas_object_show(main_win);
+
+ //elm_run();
+}
+
+// Delete main window
+static void _win_del(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_exit();
+}
+
+// Callback function
+static void _test_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ Elm_Imageslider_Item *it = event_info;
+ Elm_Imageslider_Item *sel = elm_imageslider_selected_item_get(obj);
+
+ printf("[[[ DEBUG ]]]::==================================================\n");
+ printf("[[[ DEBUG ]]]::%p %p\n", it, sel);
+ printf("[[[ DEBUG ]]]::PHOTO FILE: %s\n", elm_imageslider_item_photo_file_get(it));
+ printf("[[[ DEBUG ]]]::--------------------------------------------------------\n");
+
+}
+
+// Start up function for each test purpose
+static void
+startup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+
+ // Elm precondition
+ _elm_precondition();
+
+ // Test precondition
+ test_win = elm_win_add(NULL, "Image Silder", ELM_WIN_BASIC);
+ elm_win_title_set(test_win, "Image Slider");
+ 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);
+
+ // Add an Image Slider Widget.
+ test_eo = elm_imageslider_add(test_win);
+
+ tet_infoline("[[ TET_MSG ]]:: Completing startup");
+}
+
+// Clean up function for each test purpose
+static void
+cleanup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+
+ // Clean up the used resources.
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ if ( NULL != main_bg ) {
+ evas_object_del(main_bg);
+ main_bg = NULL;
+ }
+
+ if ( NULL != test_win ) {
+ evas_object_del(test_win);
+ test_win = NULL;
+ }
+
+ if ( NULL != test_bg ) {
+ evas_object_del(test_bg);
+ test_bg = NULL;
+ }
+
+ if ( NULL != test_eo ) {
+ evas_object_del(test_eo);
+ test_eo = NULL;
+ }
+
+ // clean up and shut down
+ elm_shutdown(); ;
+
+ tet_infoline("[[ TET_MSG ]]:: ========= TC COMPLETE ========== ");
+}
+
+
+/**
+ * @brief Positive test case of elm_imageslider_photo_file_get()
+ */
+static void utc_UIFW_elm_imageslider_photo_file_get_func_01(void)
+{
+ Elm_Imageslider_Item *it = NULL;
+ const char *path;
+
+ elm_imageslider_item_append(test_eo, imageslider_photos_path[0], _test_cb, NULL);
+ elm_imageslider_item_append(test_eo, imageslider_photos_path[1], _test_cb, NULL);
+ elm_imageslider_item_append(test_eo, imageslider_photos_path[2], _test_cb, NULL);
+
+ it = elm_imageslider_item_append(test_eo, imageslider_photos_path[3], _test_cb, NULL);
+
+ path = elm_imageslider_item_photo_file_get(it);
+ TET_CHECK_PASS(NULL, path);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, Getting the photo file path of given Image Slider item has succeed.");
+}
+
+/**
+ * @brief Negative test case of ug_init elm_imageslider_photo_file_get()
+ */
+static void utc_UIFW_elm_imageslider_photo_file_get_func_02(void)
+{
+ const char *path;
+
+ path = elm_imageslider_item_photo_file_get(NULL);
+ TET_CHECK_FAIL(NULL, path);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, Getting the photo file path of given Image Slider item has failed.");
+}
--- /dev/null
+#include <tet_api.h>
+#include <Elementary.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Evas_Object *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_imageslider_prev_func_01(void);
+static void utc_UIFW_elm_imageslider_prev_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_UIFW_elm_imageslider_prev_func_01, POSITIVE_TC_IDX },
+ { utc_UIFW_elm_imageslider_prev_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0}
+};
+
+// Declare the global variables
+Evas_Object *main_win, *main_bg;
+Evas_Object *test_win, *test_bg;
+Evas_Object *test_eo;
+
+/*
+static char *imageslider_photos_path[] = {
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item1.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item2.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item3.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item4.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item5.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item6.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item7.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item8.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item9.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item10.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item11.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item12.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item13.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item14.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item15.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item16.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item17.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item18.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item19.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item20.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item21.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item22.jpg",
+};
+*/
+
+
+// Declare internal functions
+void _elm_precondition(void);
+static void _win_del(void *data, Evas_Object *obj, void *event_info);
+//static void _test_cb(void * data, Evas_Object * obj, void * event_info);
+
+// Do precondition.
+void _elm_precondition(void)
+{
+ elm_init(0, NULL);
+
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ elm_win_title_set(main_win, "Elementary Unit Test Suite");
+ evas_object_smart_callback_add(main_win, "delete,request", _win_del, NULL);
+ main_bg = elm_bg_add(main_win);
+ evas_object_size_hint_weight_set(main_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(main_win, main_bg);
+ evas_object_show(main_bg);
+
+ // set an initial window size
+ evas_object_resize(main_win, 320, 480);
+ // show the window
+ evas_object_show(main_win);
+
+ //elm_run();
+}
+
+// Delete main window
+static void _win_del(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_exit();
+}
+
+/*
+// Callback function
+static void _test_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ Elm_Imageslider_Item *it = event_info;
+ Elm_Imageslider_Item *sel = elm_imageslider_selected_item_get(obj);
+
+ printf("[[[ DEBUG ]]]::==================================================\n");
+ printf("[[[ DEBUG ]]]::%p %p\n", it, sel);
+ printf("[[[ DEBUG ]]]::PHOTO FILE: %s\n", elm_imageslider_item_photo_file_get(it));
+ printf("[[[ DEBUG ]]]::--------------------------------------------------------\n");
+
+}
+*/
+
+// Start up function for each test purpose
+static void
+startup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+
+ // Elm precondition
+ _elm_precondition();
+
+ // Test precondition
+ test_win = elm_win_add(NULL, "Image Silder", ELM_WIN_BASIC);
+ elm_win_title_set(test_win, "Image Slider");
+ 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);
+
+ // Add an Image Slider Widget.
+ test_eo = elm_imageslider_add(test_win);
+
+ tet_infoline("[[ TET_MSG ]]:: Completing startup");
+}
+
+// Clean up function for each test purpose
+static void
+cleanup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+
+ // Clean up the used resources.
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ if ( NULL != main_bg ) {
+ evas_object_del(main_bg);
+ main_bg = NULL;
+ }
+
+ if ( NULL != test_win ) {
+ evas_object_del(test_win);
+ test_win = NULL;
+ }
+
+ if ( NULL != test_bg ) {
+ evas_object_del(test_bg);
+ test_bg = NULL;
+ }
+
+ if ( NULL != test_eo ) {
+ evas_object_del(test_eo);
+ test_eo = NULL;
+ }
+
+ // clean up and shut down
+ elm_shutdown(); ;
+
+ tet_infoline("[[ TET_MSG ]]:: ========= TC COMPLETE ========== ");
+}
+
+/**
+ * @brief Positive test case of elm_imageslider_prev()
+ */
+static void utc_UIFW_elm_imageslider_prev_func_01(void)
+{
+ // Current return type is "Void", but will change to Bool.
+ elm_imageslider_prev(test_eo);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, Moving to the previous Image Slider item has succeed.");
+}
+
+/**
+ * @brief Negative test case of ug_init elm_imageslider_prev()
+ */
+static void utc_UIFW_elm_imageslider_prev_func_02(void)
+{
+ // Current return type is "Void", but will change to Bool.
+ elm_imageslider_prev(NULL);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, Moving to the previous Image Slider item has failed.");
+}
--- /dev/null
+#include <tet_api.h>
+#include <Elementary.h>
+
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+ Elm_Imageslider_Item *err = y; \
+ if (err == (x1)) \
+ { \
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+ Elm_Imageslider_Item *err = y; \
+ if (err != (x1)) \
+ { \
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+ tet_result(TET_FAIL); \
+ return; \
+ } \
+}
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_imageslider_selected_item_get_func_01(void);
+static void utc_UIFW_elm_imageslider_selected_item_get_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_UIFW_elm_imageslider_selected_item_get_func_01, POSITIVE_TC_IDX },
+ { utc_UIFW_elm_imageslider_selected_item_get_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0}
+};
+
+// Declare the global variables
+Evas_Object *main_win, *main_bg;
+Evas_Object *test_win, *test_bg;
+Evas_Object *test_eo;
+static char *imageslider_photos_path[] = {
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item1.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item2.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item3.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item4.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item5.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item6.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item7.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item8.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item9.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item10.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item11.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item12.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item13.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item14.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item15.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item16.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item17.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item18.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item19.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item20.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item21.jpg",
+ "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item22.jpg",
+};
+
+
+// Declare internal functions
+void _elm_precondition(void);
+static void _win_del(void *data, Evas_Object *obj, void *event_info);
+static void _test_cb(void * data, Evas_Object * obj, void * event_info);
+
+// Do precondition.
+void _elm_precondition(void)
+{
+ elm_init(0, NULL);
+
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ elm_win_title_set(main_win, "Elementary Unit Test Suite");
+ evas_object_smart_callback_add(main_win, "delete,request", _win_del, NULL);
+ main_bg = elm_bg_add(main_win);
+ evas_object_size_hint_weight_set(main_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(main_win, main_bg);
+ evas_object_show(main_bg);
+
+ // set an initial window size
+ evas_object_resize(main_win, 320, 480);
+ // show the window
+ evas_object_show(main_win);
+
+ //elm_run();
+}
+
+// Delete main window
+static void _win_del(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_exit();
+}
+
+// Callback function
+static void _test_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ Elm_Imageslider_Item *it = event_info;
+ Elm_Imageslider_Item *sel = elm_imageslider_selected_item_get(obj);
+
+ printf("[[[ DEBUG ]]]::==================================================\n");
+ printf("[[[ DEBUG ]]]::%p %p\n", it, sel);
+ printf("[[[ DEBUG ]]]::PHOTO FILE: %s\n", elm_imageslider_item_photo_file_get(it));
+ printf("[[[ DEBUG ]]]::--------------------------------------------------------\n");
+
+}
+
+// Start up function for each test purpose
+static void
+startup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+
+ // Elm precondition
+ _elm_precondition();
+
+ // Test precondition
+ test_win = elm_win_add(NULL, "Image Silder", ELM_WIN_BASIC);
+ elm_win_title_set(test_win, "Image Slider");
+ 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);
+
+ // Add an Image Slider Widget.
+ test_eo = elm_imageslider_add(test_win);
+
+ tet_infoline("[[ TET_MSG ]]:: Completing startup");
+}
+
+// Clean up function for each test purpose
+static void
+cleanup()
+{
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+
+ // Clean up the used resources.
+ if ( NULL != main_win ) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ if ( NULL != main_bg ) {
+ evas_object_del(main_bg);
+ main_bg = NULL;
+ }
+
+ if ( NULL != test_win ) {
+ evas_object_del(test_win);
+ test_win = NULL;
+ }
+
+ if ( NULL != test_bg ) {
+ evas_object_del(test_bg);
+ test_bg = NULL;
+ }
+
+ if ( NULL != test_eo ) {
+ evas_object_del(test_eo);
+ test_eo = NULL;
+ }
+
+ // clean up and shut down
+ elm_shutdown(); ;
+
+ tet_infoline("[[ TET_MSG ]]:: ========= TC COMPLETE ========== ");
+}
+
+/**
+ * @brief Positive test case of elm_imageslider_selected_item_get()
+ */
+static void utc_UIFW_elm_imageslider_selected_item_get_func_01(void)
+{
+ Elm_Imageslider_Item *it = NULL;
+
+ elm_imageslider_item_append(test_eo, imageslider_photos_path[0], _test_cb, NULL);
+ elm_imageslider_item_append(test_eo, imageslider_photos_path[1], _test_cb, NULL);
+ elm_imageslider_item_append(test_eo, imageslider_photos_path[3], _test_cb, NULL);
+
+ it = elm_imageslider_selected_item_get(test_eo);
+ TET_CHECK_PASS(NULL, it);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, Getting the selected Image Slider item has succeed.");
+}
+
+/**
+ * @brief Negative test case of ug_init elm_imageslider_selected_item_get()
+ */
+static void utc_UIFW_elm_imageslider_selected_item_get_func_02(void)
+{
+ Elm_Imageslider_Item *it = NULL;
+
+ it = elm_imageslider_selected_item_get(NULL);
+ TET_CHECK_FAIL(NULL, it);
+
+ tet_result(TET_PASS);
+ tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, Getting the selected Image Slider item has failed.");
+}