#define APPS_DB_NAME ".apps-data.db"
-app_data_t calendar = {
- INIT_VALUE,
- APPS_ROOT,
- TEMP_OWNER,
- false,
- INIT_VALUE,
- "org.tizen.calendar",
- "org.tizen.calendar",
- "Calendar",
- "/usr/apps/org.tizen.calendar/shared/res/calendar.png",
- NULL,
- APPS_DATA_TYPE_APP,
- false,
- false,
- NULL,
- NULL,
- 0,
- false,
- false,
- INTERNAL,
- true};
-
-app_data_t calendar2 = {
- INIT_VALUE,
- APPS_ROOT,
- TEMP_OWNER,
- false,
- INIT_VALUE,
- "org.tizen.calendar2",
- "org.tizen.calendar",
- "Calendar",
- "/usr/apps/org.tizen.calendar/shared/res/calendar.png",
- NULL,
- APPS_DATA_TYPE_APP,
- false,
- false,
- NULL,
- NULL,
- 0,
- false,
- false,
- INTERNAL,
- true};
-
-app_data_t clock_app = {
- INIT_VALUE,
- APPS_ROOT,
- TEMP_OWNER,
- false,
- INIT_VALUE,
- "org.tizen.clock",
- "org.tizen.clock",
- "Clockr",
- "/usr/apps/org.tizen.clock/shared/res/clock.png",
- NULL,
- APPS_DATA_TYPE_APP,
- true,
- false,
- NULL,
- NULL,
- 0,
- false,
- false,
- EXTERNAL,
- true};
-
app_data_t folder = {
INIT_VALUE,
APPS_ROOT,
Eina_List *list = NULL, *find_list = NULL;
app_data_t * item = NULL;
- /* insert calendar */
- TEST_ASSERT_TRUE(apps_db_insert(&calendar));
-
- /* check calendar */
- EINA_LIST_FREE(list, item) {
- __t__apps_data_item_free(item);
- }
- list = NULL;
- apps_db_get_list(&list);
-
- TEST_ASSERT_TRUE(list != NULL);
-
- find_list = list;
-
- item = eina_list_data_get(find_list);
-
- TEST_ASSERT_EQUAL_INT(calendar.parent_db_id, item->parent_db_id);
- TEST_ASSERT_EQUAL_STRING(calendar.owner, item->owner);
- TEST_ASSERT_EQUAL_INT(calendar.is_folder, item->is_folder);
- TEST_ASSERT_EQUAL_INT(calendar.position, item->position);
- TEST_ASSERT_EQUAL_STRING(calendar.app_id, item->app_id);
- TEST_ASSERT_EQUAL_STRING(calendar.pkg_id, item->pkg_id);
- TEST_ASSERT_EQUAL_STRING(calendar.label_str, item->label_str);
- TEST_ASSERT_EQUAL_STRING(calendar.icon_path_str, item->icon_path_str);
- TEST_ASSERT_TRUE(item->uri == NULL);
- TEST_ASSERT_EQUAL_INT(calendar.type, item->type);
- TEST_ASSERT_EQUAL_INT(calendar.is_removable, item->is_removable);
- TEST_ASSERT_EQUAL_INT(calendar.is_system, item->is_system);
- TEST_ASSERT_EQUAL_INT(calendar.storage_type, item->storage_type);
- TEST_ASSERT_EQUAL_INT(calendar.enable, item->enable);
- find_list = eina_list_next(find_list);
-
- TEST_ASSERT_TRUE(find_list == NULL);
-
- /* insert clock */
- TEST_ASSERT_TRUE(apps_db_insert(&clock_app));
-
- /*check calendar, clock */
- EINA_LIST_FREE(list, item) {
- __t__apps_data_item_free(item);
- }
- list = NULL;
- apps_db_get_list(&list);
-
- TEST_ASSERT_TRUE(list != NULL);
-
- find_list = list;
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar.app_id, item->app_id);
-
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_INT(clock_app.parent_db_id, item->parent_db_id);
- TEST_ASSERT_EQUAL_STRING(clock_app.owner, item->owner);
- TEST_ASSERT_EQUAL_INT(clock_app.is_folder, item->is_folder);
- TEST_ASSERT_EQUAL_INT(clock_app.position, item->position);
- TEST_ASSERT_EQUAL_STRING(clock_app.app_id, item->app_id);
- TEST_ASSERT_EQUAL_STRING(clock_app.pkg_id, item->pkg_id);
- TEST_ASSERT_EQUAL_STRING(clock_app.label_str, item->label_str);
- TEST_ASSERT_EQUAL_STRING(clock_app.icon_path_str, item->icon_path_str);
- TEST_ASSERT_TRUE(item->uri == NULL);
- TEST_ASSERT_EQUAL_INT(clock_app.type, item->type);
- TEST_ASSERT_EQUAL_INT(clock_app.is_removable, item->is_removable);
- TEST_ASSERT_EQUAL_INT(clock_app.is_system, item->is_system);
- TEST_ASSERT_EQUAL_INT(clock_app.storage_type, item->storage_type);
- TEST_ASSERT_EQUAL_INT(clock_app.enable, item->enable);
- find_list = eina_list_next(find_list);
-
- TEST_ASSERT_TRUE(find_list == NULL);
-
/* insert folder */
TEST_ASSERT_TRUE(apps_db_insert(&folder));
- /*check calendar, clock, folder */
+ /*check folder */
EINA_LIST_FREE(list, item) {
__t__apps_data_item_free(item);
}
find_list = list;
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(clock_app.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_INT(folder.parent_db_id, item->parent_db_id);
TEST_ASSERT_EQUAL_STRING(folder.owner, item->owner);
TEST_ASSERT_EQUAL_INT(folder.is_folder, item->is_folder);
/* insert shorcut */
TEST_ASSERT_TRUE(apps_db_insert(&shortcut));
- /*check calendar, clock, folder, shortcut */
+ /*check folder, shortcut */
EINA_LIST_FREE(list, item) {
__t__apps_data_item_free(item);
}
find_list = list;
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(clock_app.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_STRING(folder.app_id, item->app_id);
find_list = eina_list_next(find_list);
Eina_List *list = NULL, *find_list = NULL;
app_data_t * item = NULL;
- /* insert calendar, clock, folder, shorcut */
- TEST_ASSERT_TRUE(apps_db_insert(&calendar));
- TEST_ASSERT_TRUE(apps_db_insert(&clock_app));
+ /* insert folder, shorcut */
TEST_ASSERT_TRUE(apps_db_insert(&folder));
TEST_ASSERT_TRUE(apps_db_insert(&shortcut));
- /* check calendar, clock, folder, shortcut */
+ /* check folder, shortcut */
EINA_LIST_FREE(list, item) {
__t__apps_data_item_free(item);
}
find_list = list;
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(clock_app.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_STRING(folder.app_id, item->app_id);
find_list = eina_list_next(find_list);
/* delete shortcut */
TEST_ASSERT_TRUE(apps_db_delete(&shortcut));
- /* check calendar, clock, folder */
+ /* check folder */
EINA_LIST_FREE(list, item) {
__t__apps_data_item_free(item);
}
find_list = list;
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(clock_app.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_STRING(folder.app_id, item->app_id);
find_list = eina_list_next(find_list);
TEST_ASSERT_TRUE(find_list == NULL);
- /* delete clock */
- TEST_ASSERT_TRUE(apps_db_delete(&clock_app));
-
- /* check calendar, folder */
+ /* check folder */
EINA_LIST_FREE(list, item) {
__t__apps_data_item_free(item);
}
find_list = list;
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_STRING(folder.app_id, item->app_id);
find_list = eina_list_next(find_list);
TEST_ASSERT_TRUE(find_list == NULL);
- /* delete calendar */
- TEST_ASSERT_TRUE(apps_db_delete(&calendar));
-
/* check folder */
EINA_LIST_FREE(list, item) {
__t__apps_data_item_free(item);
TEST_CASE_DONE(s_info.group);
}
-static unit_case_func_t __case_delete_by_app_id(void * data)
-{
- Eina_List *list = NULL, *find_list = NULL;
- app_data_t * item = NULL;
-
- /* insert calendar, calendar2, clock */
- TEST_ASSERT_TRUE(apps_db_insert(&calendar));
- TEST_ASSERT_TRUE(apps_db_insert(&calendar2));
- TEST_ASSERT_TRUE(apps_db_insert(&clock_app));
-
- /* check calendar, calendar2, clock */
- EINA_LIST_FREE(list, item) {
- __t__apps_data_item_free(item);
- }
- list = NULL;
- apps_db_get_list(&list);
-
- TEST_ASSERT_TRUE(list != NULL);
-
- find_list = list;
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar2.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(clock_app.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- TEST_ASSERT_TRUE(find_list == NULL);
-
- /* delete calendar2 */
- TEST_ASSERT_TRUE(apps_db_delete_by_app_id(calendar2.app_id));
-
- /* check calendar, clock */
- EINA_LIST_FREE(list, item) {
- __t__apps_data_item_free(item);
- }
- list = NULL;
- apps_db_get_list(&list);
-
- TEST_ASSERT_TRUE(list != NULL);
-
- find_list = list;
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(clock_app.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- TEST_ASSERT_TRUE(find_list == NULL);
-
- TEST_CASE_DONE(s_info.group);
-}
-
-static unit_case_func_t __case_delete_by_package_id(void * data)
-{
- Eina_List *list = NULL, *find_list = NULL;
- app_data_t * item = NULL;
-
- /* insert calendar, calendar2, clock */
- TEST_ASSERT_TRUE(apps_db_insert(&calendar));
- TEST_ASSERT_TRUE(apps_db_insert(&calendar2));
- TEST_ASSERT_TRUE(apps_db_insert(&clock_app));
-
- /* check calendar, calendar2, clock */
- EINA_LIST_FREE(list, item) {
- __t__apps_data_item_free(item);
- }
- list = NULL;
- apps_db_get_list(&list);
-
- TEST_ASSERT_TRUE(list != NULL);
-
- find_list = list;
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar2.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(clock_app.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- TEST_ASSERT_TRUE(find_list == NULL);
-
- /* delete calendar, calendar2 */
- TEST_ASSERT_TRUE(apps_db_delete_by_pkg_id(calendar.pkg_id));
-
- /* check clock */
- EINA_LIST_FREE(list, item) {
- __t__apps_data_item_free(item);
- }
- list = NULL;
- apps_db_get_list(&list);
-
- TEST_ASSERT_TRUE(list != NULL);
-
- find_list = list;
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(clock_app.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- TEST_ASSERT_TRUE(find_list == NULL);
-
- TEST_CASE_DONE(s_info.group);
-}
-
static unit_case_func_t __case_update_app_item(void * data)
{
Eina_List *list = NULL, *find_list = NULL;
app_data_t * item = NULL;
- /* insert calendar, clock, folder, shorcut */
- TEST_ASSERT_TRUE(apps_db_insert(&calendar));
- TEST_ASSERT_TRUE(apps_db_insert(&clock_app));
+ /* insert folder, shorcut */
TEST_ASSERT_TRUE(apps_db_insert(&folder));
TEST_ASSERT_TRUE(apps_db_insert(&shortcut));
- /* check calendar, clock, folder, shortcut */
+ /* check folder, shortcut */
EINA_LIST_FREE(list, item) {
__t__apps_data_item_free(item);
}
find_list = list;
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(clock_app.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_STRING(folder.app_id, item->app_id);
find_list = eina_list_next(find_list);
TEST_ASSERT_TRUE(find_list == NULL);
- /* update calendar -> calendar2 */
- calendar2.db_id = calendar.db_id;
- TEST_ASSERT_TRUE(apps_db_update(&calendar2));
-
- /* check calendar2, clock, folder, shorcut */
+ /* check folder, shorcut */
EINA_LIST_FREE(list, item) {
__t__apps_data_item_free(item);
}
find_list = list;
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar2.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(clock_app.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_STRING(folder.app_id, item->app_id);
find_list = eina_list_next(find_list);
TEST_ASSERT_TRUE(find_list == NULL);
- /* delete clock */
- TEST_ASSERT_TRUE(apps_db_delete(&clock_app));
-
- /* update folder -> clock */
- clock_app.db_id = folder.db_id;
- TEST_ASSERT_TRUE(apps_db_update(&clock_app));
-
- /* check calendar2, clock, shorcut */
+ /* check shorcut */
EINA_LIST_FREE(list, item) {
__t__apps_data_item_free(item);
}
find_list = list;
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar2.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(clock_app.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_STRING(shortcut.app_id, item->app_id);
find_list = eina_list_next(find_list);
/* update shorcut */
TEST_ASSERT_TRUE(apps_db_update(&shortcut));
- /* check calendar2, clock */
EINA_LIST_FREE(list, item) {
__t__apps_data_item_free(item);
}
list = NULL;
apps_db_get_list(&list);
- TEST_ASSERT_TRUE(list != NULL);
-
find_list = list;
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar2.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(clock_app.app_id, item->app_id);
- find_list = eina_list_next(find_list);
-
TEST_ASSERT_TRUE(find_list == NULL);
TEST_CASE_DONE(s_info.group);
Eina_List *list = NULL, *find_list = NULL;
app_data_t * item = NULL;
- /* insert calendar, clock, folder, shorcut */
- TEST_ASSERT_TRUE(apps_db_insert(&calendar));
- TEST_ASSERT_TRUE(apps_db_insert(&clock_app));
+ /* insert folder, shorcut */
TEST_ASSERT_TRUE(apps_db_insert(&folder));
TEST_ASSERT_TRUE(apps_db_insert(&shortcut));
- /* check calendar, clock */
+ /* check folder, shorcut */
EINA_LIST_FREE(list, item) {
__t__apps_data_item_free(item);
}
find_list = list;
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar.app_id, item->app_id);
+ TEST_ASSERT_EQUAL_STRING(folder.app_id, item->app_id);
find_list = eina_list_next(find_list);
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(clock_app.app_id, item->app_id);
+ TEST_ASSERT_EQUAL_STRING(shortcut.app_id, item->app_id);
find_list = eina_list_next(find_list);
TEST_ASSERT_TRUE(find_list == NULL);
TEST_CASE_ADD(s_info.group, __case_check_apps_db, NULL);
TEST_CASE_ADD(s_info.group, __case_insert_app_item, NULL);
TEST_CASE_ADD(s_info.group, __case_delete_app_item, NULL);
- TEST_CASE_ADD(s_info.group, __case_delete_by_app_id, NULL);
- TEST_CASE_ADD(s_info.group, __case_delete_by_package_id, NULL);
TEST_CASE_ADD(s_info.group, __case_update_app_item, NULL);
TEST_CASE_ADD(s_info.group, __case_get_app_type, NULL);
#define CLUSTER_DB_NAME ".cluster-data.db"
-widget_data_t calendar_widget = {
- INIT_VALUE,
- 0,
- 0,
- 0,
- "org.tizen.calendar",
- "org.tizen.calendar.widget",
- "org.tizen.calendar",
- WIDGET_SIZE_TYPE_4x4,
- 0.0,
- 1,
- NULL,
- NULL,
- NULL,
-};
-
widget_data_t contact_widget = {
INIT_VALUE,
0,
NULL,
};
-widget_data_t memo_widget = {
- INIT_VALUE,
- 0,
- 0,
- 0,
- "org.tizen.memo",
- "org.tizen.memo.widget",
- "org.tizen.memo",
- WIDGET_SIZE_TYPE_4x4,
- 0.0,
- 1,
- NULL,
- NULL,
- NULL,
-};
-
widget_data_t music_widget = {
INIT_VALUE,
0,
Eina_List *list = NULL, *find_list = NULL;
widget_data_t * item = NULL;
- /* insert calendar */
- TEST_ASSERT_TRUE(cluster_db_insert(&calendar_widget));
-
- /* check calendar */
- EINA_LIST_FREE(list, item) {
- __t__cluster_data_item_free(item);
- }
- list = NULL;
- cluster_db_get_list(&list);
-
- TEST_ASSERT_TRUE(list != NULL);
-
- find_list = list;
-
- item = eina_list_data_get(find_list);
-
- TEST_ASSERT_EQUAL_INT(calendar_widget.page_idx, item->page_idx);
- TEST_ASSERT_EQUAL_INT(calendar_widget.pos_y, item->pos_y);
- TEST_ASSERT_EQUAL_INT(calendar_widget.pos_x, item->pos_x);
- TEST_ASSERT_EQUAL_STRING(calendar_widget.pkg_name, item->pkg_name);
- TEST_ASSERT_EQUAL_STRING(calendar_widget.widget_label, item->widget_label);
- TEST_ASSERT_EQUAL_STRING(calendar_widget.content_info, item->content_info);
- TEST_ASSERT_EQUAL_INT(calendar_widget.type, item->type);
- TEST_ASSERT_EQUAL_DOUBLE(calendar_widget.period, item->period);
- TEST_ASSERT_EQUAL_INT(calendar_widget.allow_duplicate, item->allow_duplicate);
- find_list = eina_list_next(find_list);
-
- TEST_ASSERT_TRUE(find_list == NULL);
-
/* insert contact */
TEST_ASSERT_TRUE(cluster_db_insert(&contact_widget));
find_list = list;
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar_widget.pkg_name, item->pkg_name);
-
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_INT(contact_widget.page_idx, item->page_idx);
TEST_ASSERT_EQUAL_INT(contact_widget.pos_y, item->pos_y);
TEST_ASSERT_EQUAL_INT(contact_widget.pos_x, item->pos_x);
TEST_ASSERT_TRUE(find_list == NULL);
- /* insert memo */
- TEST_ASSERT_TRUE(cluster_db_insert(&memo_widget));
-
- /*check calendar, contact, memo */
EINA_LIST_FREE(list, item) {
__t__cluster_data_item_free(item);
}
find_list = list;
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar_widget.pkg_name, item->pkg_name);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_STRING(contact_widget.pkg_name, item->pkg_name);
find_list = eina_list_next(find_list);
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_INT(memo_widget.page_idx, item->page_idx);
- TEST_ASSERT_EQUAL_INT(memo_widget.pos_y, item->pos_y);
- TEST_ASSERT_EQUAL_INT(memo_widget.pos_x, item->pos_x);
- TEST_ASSERT_EQUAL_STRING(memo_widget.pkg_name, item->pkg_name);
- TEST_ASSERT_EQUAL_STRING(memo_widget.widget_label, item->widget_label);
- TEST_ASSERT_EQUAL_STRING(memo_widget.content_info, item->content_info);
- TEST_ASSERT_EQUAL_INT(memo_widget.type, item->type);
- TEST_ASSERT_EQUAL_DOUBLE(memo_widget.period, item->period);
- TEST_ASSERT_EQUAL_INT(memo_widget.allow_duplicate, item->allow_duplicate);
- find_list = eina_list_next(find_list);
-
TEST_ASSERT_TRUE(find_list == NULL);
/* insert music */
TEST_ASSERT_TRUE(cluster_db_insert(&music_widget));
- /*check calendar, contact, memo, music */
+ /*check contact, music */
EINA_LIST_FREE(list, item) {
__t__cluster_data_item_free(item);
}
find_list = list;
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar_widget.pkg_name, item->pkg_name);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_STRING(contact_widget.pkg_name, item->pkg_name);
find_list = eina_list_next(find_list);
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(memo_widget.pkg_name, item->pkg_name);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_INT(music_widget.page_idx, item->page_idx);
TEST_ASSERT_EQUAL_INT(music_widget.pos_y, item->pos_y);
TEST_ASSERT_EQUAL_INT(music_widget.pos_x, item->pos_x);
Eina_List *list = NULL, *find_list = NULL;
widget_data_t * item = NULL;
- /* insert calendar, contact, memo, music*/
- TEST_ASSERT_TRUE(cluster_db_insert(&calendar_widget));
+ /* insert contact, music*/
TEST_ASSERT_TRUE(cluster_db_insert(&contact_widget));
- TEST_ASSERT_TRUE(cluster_db_insert(&memo_widget));
TEST_ASSERT_TRUE(cluster_db_insert(&music_widget));
- /* check calendar, contact, memo, music*/
+ /* check contact, music*/
EINA_LIST_FREE(list, item) {
__t__cluster_data_item_free(item);
}
find_list = list;
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar_widget.pkg_name, item->pkg_name);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_STRING(contact_widget.pkg_name, item->pkg_name);
find_list = eina_list_next(find_list);
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(memo_widget.pkg_name, item->pkg_name);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_STRING(music_widget.pkg_name, item->pkg_name);
find_list = eina_list_next(find_list);
/* delete music */
TEST_ASSERT_TRUE(cluster_db_delete(&music_widget));
- /* check calendar, contact, memo*/
+ /* check contact*/
EINA_LIST_FREE(list, item) {
__t__cluster_data_item_free(item);
}
find_list = list;
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar_widget.pkg_name, item->pkg_name);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_STRING(contact_widget.pkg_name, item->pkg_name);
find_list = eina_list_next(find_list);
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(memo_widget.pkg_name, item->pkg_name);
- find_list = eina_list_next(find_list);
-
TEST_ASSERT_TRUE(find_list == NULL);
/* delete contact */
TEST_ASSERT_TRUE(cluster_db_delete(&contact_widget));
- /* check calendar, memo */
- EINA_LIST_FREE(list, item) {
- __t__cluster_data_item_free(item);
- }
- list = NULL;
- cluster_db_get_list(&list);
-
- TEST_ASSERT_TRUE(list != NULL);
-
- find_list = list;
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar_widget.pkg_name, item->pkg_name);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(memo_widget.pkg_name, item->pkg_name);
- find_list = eina_list_next(find_list);
-
- TEST_ASSERT_TRUE(find_list == NULL);
-
- /* delete calendar */
- TEST_ASSERT_TRUE(cluster_db_delete(&calendar_widget));
-
- /* check memo */
- EINA_LIST_FREE(list, item) {
- __t__cluster_data_item_free(item);
- }
- list = NULL;
- cluster_db_get_list(&list);
-
- TEST_ASSERT_TRUE(list != NULL);
-
- find_list = list;
-
- item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(memo_widget.pkg_name, item->pkg_name);
- find_list = eina_list_next(find_list);
-
- TEST_ASSERT_TRUE(find_list == NULL);
-
- /* delete memo */
- TEST_ASSERT_TRUE(cluster_db_delete(&memo_widget));
-
/* check empty list */
EINA_LIST_FREE(list, item) {
__t__cluster_data_item_free(item);
Eina_List *list = NULL, *find_list = NULL;
widget_data_t * item = NULL;
- /* insert calendar, contact, memo, music*/
- TEST_ASSERT_TRUE(cluster_db_insert(&calendar_widget));
+ /* insert contact, music*/
TEST_ASSERT_TRUE(cluster_db_insert(&contact_widget));
- TEST_ASSERT_TRUE(cluster_db_insert(&memo_widget));
TEST_ASSERT_TRUE(cluster_db_insert(&music_widget));
- /* check calendar, contact, memo, music*/
+ /* check contact, music*/
EINA_LIST_FREE(list, item) {
__t__cluster_data_item_free(item);
}
find_list = list;
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar_widget.pkg_name, item->pkg_name);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_STRING(contact_widget.pkg_name, item->pkg_name);
TEST_ASSERT_EQUAL_INT(WIDGET_SIZE_TYPE_4x4, item->type);
find_list = eina_list_next(find_list);
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(memo_widget.pkg_name, item->pkg_name);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_STRING(music_widget.pkg_name, item->pkg_name);
find_list = eina_list_next(find_list);
contact_widget2.db_id = contact_widget.db_id;
TEST_ASSERT_TRUE(cluster_db_update(&contact_widget2));
- /* check calendar, contact2, memo, music*/
+ /* check contact2, music*/
EINA_LIST_FREE(list, item) {
__t__cluster_data_item_free(item);
}
find_list = list;
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(calendar_widget.pkg_name, item->pkg_name);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_STRING(contact_widget2.pkg_name, item->pkg_name);
TEST_ASSERT_EQUAL_INT(WIDGET_SIZE_TYPE_4x2, item->type);
find_list = eina_list_next(find_list);
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(memo_widget.pkg_name, item->pkg_name);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_STRING(music_widget.pkg_name, item->pkg_name);
find_list = eina_list_next(find_list);
TEST_ASSERT_TRUE(find_list == NULL);
- /* delete memo */
- TEST_ASSERT_TRUE(cluster_db_delete(&memo_widget));
-
- /* update calendar -> memo */
- memo_widget.db_id = calendar_widget.db_id;
- TEST_ASSERT_TRUE(cluster_db_update(&memo_widget));
-
- /* check memo, contact2, music */
+ /* check contact2, music */
EINA_LIST_FREE(list, item) {
__t__cluster_data_item_free(item);
}
find_list = list;
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(memo_widget.pkg_name, item->pkg_name);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_STRING(contact_widget2.pkg_name, item->pkg_name);
TEST_ASSERT_EQUAL_INT(WIDGET_SIZE_TYPE_4x2, item->type);
find_list = eina_list_next(find_list);
/* update music */
TEST_ASSERT_TRUE(cluster_db_update(&music_widget));
- /* check memo, contact2 */
+ /* check contact2 */
EINA_LIST_FREE(list, item) {
__t__cluster_data_item_free(item);
}
find_list = list;
item = eina_list_data_get(find_list);
- TEST_ASSERT_EQUAL_STRING(memo_widget.pkg_name, item->pkg_name);
- find_list = eina_list_next(find_list);
-
- item = eina_list_data_get(find_list);
TEST_ASSERT_EQUAL_STRING(contact_widget2.pkg_name, item->pkg_name);
TEST_ASSERT_EQUAL_INT(WIDGET_SIZE_TYPE_4x2, item->type);
find_list = eina_list_next(find_list);