}
app_control_h app_control_handle = NULL;
app_control_create(&app_control_handle);
- app_control_set_package(app_control_handle, "org.tizen.watch-setting");
+ app_control_set_app_id(app_control_handle, "org.tizen.watch-setting");
app_control_add_extra_data(app_control_handle, "launch-type", "watchface");
app_control_send_launch_request(app_control_handle, NULL, NULL);
app_control_destroy(app_control_handle);
__update_control_view();
__do_not_disturb_status_changed_cb(NULL, NULL);
__flight_mode_status_changed_cb(NULL, NULL);
- __volume_status_changed_cb(0, NULL, NULL);
+ __volume_status_changed_cb(0, 0, NULL);
__brightness_status_changed_cb();
}
return callforwarding;
}
-static int __get_icon_position_index(status_icon_type_e type)
-{
- Eina_List *list = NULL;
- void *data = NULL;
-
- int i = 0;
- EINA_LIST_FOREACH(__status_icon_type_list, list, data) {
- status_icon_type_e type_in_list = (status_icon_type_e)data;
- if (type == type_in_list) return i;
- i++;
- }
- return -1;
-}
-
static void __remove_all_icons(void)
{
- Eina_List *list = NULL;
- void *data = NULL;
- int i = 0;
+ __status_icon_type_list = eina_list_free(__status_icon_type_list);
- EINA_LIST_FOREACH(__status_icon_type_list, list, data) {
- __status_icon_type_list = eina_list_remove_list(__status_icon_type_list, list);
- }
+ int i = 0;
for (i = 0; i < STATUS_ICON_MAX_COUNT; i++)
{
if (s_info.icon_array[i]) {
return s_info.icon_array[STATUS_ICON_CALLFORWARDING];
}
+static int __get_icon_position_index(status_icon_type_e type)
+{
+ Eina_List *list = NULL;
+ void *data = NULL;
+
+ int i = 0;
+ EINA_LIST_FOREACH(__status_icon_type_list, list, data) {
+ status_icon_type_e type_in_list = (status_icon_type_e)data;
+ if (type == type_in_list) return i;
+ i++;
+ }
+ return -1;
+}
+
int __t__get_moments_status_icon_index(int type)
{
return __get_icon_position_index(type);
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#ifndef __FEATURE_TEST__
#define __FEATURE_TEST__
unit_case_func_t __case_check_do_not_disturb(void * data)
{
Eina_List *button_list = __t__get_moments_control_button_list();
- TEST_ASSERT_TRUE_UPGRADE(button_list != NULL);
+ TEST_ASSERT_TRUE(button_list != NULL);
Eina_List *l = NULL;
control_info_t *button = NULL;
}
}
- TEST_ASSERT_TRUE_UPGRADE(button != NULL);
+ TEST_ASSERT_TRUE(button != NULL);
s_info.current_button = button;
double val = 0.0;
- TEST_ASSERT_EQUAL_STRING_UPGRADE("default", edje_object_part_state_get(elm_layout_edje_get(button->button_layout), CONTROLS_BAR, &val));
+ TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(button->button_layout), CONTROLS_BAR, &val));
- TEST_ASSERT_TRUE_UPGRADE(button->pressed != NULL);
+ TEST_ASSERT_TRUE(button->pressed != NULL);
button->pressed(NULL, NULL, NULL, NULL);
unit_case_func_t __continue_check_do_not_disturb(void * data)
{
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+ TEST_ASSERT_TRUE(moments_get_visible() == false);
Evas_Object *popup = __t__get_moments_do_not_disturb_popup();
- TEST_ASSERT_TRUE_UPGRADE(popup != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(popup));
+ TEST_ASSERT_TRUE(popup != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(popup));
Evas_Object *layout = __t__get_moments_do_not_disturb_popup_layout();
const char *title_text = elm_object_part_text_get(layout, "elm.text.title");
- TEST_ASSERT_TRUE_UPGRADE(title_text != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE("Do not disturb", title_text);
+ TEST_ASSERT_TRUE(title_text != NULL);
+ TEST_ASSERT_EQUAL_STRING("Do not disturb", title_text);
const char *contents_text = elm_object_part_text_get(layout, "elm.text");
- TEST_ASSERT_TRUE_UPGRADE(contents_text != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE("Sounds will be muted and screen will remain turned off for incoming calls and alerts, but not alarms.", contents_text);
+ TEST_ASSERT_TRUE(contents_text != NULL);
+ TEST_ASSERT_EQUAL_STRING("Sounds will be muted and screen will remain turned off for incoming calls and alerts, but not alarms.", contents_text);
Evas_Object *left_btn = elm_object_part_content_get(popup, "button1");
- TEST_ASSERT_TRUE_UPGRADE(left_btn != NULL);
+ TEST_ASSERT_TRUE(left_btn != NULL);
Evas_Object *left_btn_icon = elm_object_part_content_get(left_btn, "elm.swallow.content");
- TEST_ASSERT_TRUE_UPGRADE(left_btn_icon != NULL);
+ TEST_ASSERT_TRUE(left_btn_icon != NULL);
const char *left_icon_image = NULL;
elm_image_file_get(left_btn_icon, &left_icon_image , NULL);
- TEST_ASSERT_TRUE_UPGRADE(left_icon_image != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(IMAGEDIR"/tw_ic_popup_btn_delete.png", left_icon_image);
+ TEST_ASSERT_TRUE(left_icon_image != NULL);
+ TEST_ASSERT_EQUAL_STRING(IMAGEDIR"/tw_ic_popup_btn_delete.png", left_icon_image);
Evas_Object *right_btn = elm_object_part_content_get(popup, "button2");
- TEST_ASSERT_TRUE_UPGRADE(right_btn != NULL);
+ TEST_ASSERT_TRUE(right_btn != NULL);
Evas_Object *right_btn_icon = elm_object_part_content_get(right_btn, "elm.swallow.content");
- TEST_ASSERT_TRUE_UPGRADE(right_btn_icon != NULL);
+ TEST_ASSERT_TRUE(right_btn_icon != NULL);
const char *right_icon_image = NULL;
elm_image_file_get(right_btn_icon, &right_icon_image, NULL);
- TEST_ASSERT_TRUE_UPGRADE(right_icon_image != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(IMAGEDIR"/tw_ic_popup_btn_check.png", right_icon_image);
+ TEST_ASSERT_TRUE(right_icon_image != NULL);
+ TEST_ASSERT_EQUAL_STRING(IMAGEDIR"/tw_ic_popup_btn_check.png", right_icon_image);
__t__do_not_disturb_popup_cancel_cb((void*)popup, NULL, NULL);
{
Evas_Object *popup = __t__get_moments_do_not_disturb_popup();
if (popup == NULL) {
- TEST_ASSERT_TRUE_UPGRADE(s_info.current_button != NULL);
+ TEST_ASSERT_TRUE(s_info.current_button != NULL);
s_info.current_button->pressed(s_info.current_button, NULL, NULL, NULL);
TEST_CASE_CONTINUE(0.2, __case_check_cancel_button_clicked_on_do_not_disturb_popup, NULL);
}
- TEST_ASSERT_TRUE_UPGRADE(popup != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(popup));
+ TEST_ASSERT_TRUE(popup != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(popup));
__t__do_not_disturb_popup_cancel_cb((void*)popup, NULL, NULL);
unit_case_func_t __continue_check_cancel_button_clicked_on_do_not_disturb_popup(void * data)
{
Evas_Object *popup = __t__get_moments_do_not_disturb_popup();
- TEST_ASSERT_TRUE_UPGRADE(popup == NULL);
+ TEST_ASSERT_TRUE(popup == NULL);
double val = 0.0;
- TEST_ASSERT_EQUAL_STRING_UPGRADE("default", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
+ TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+ TEST_ASSERT_TRUE(moments_get_visible() == false);
TEST_CASE_DONE(s_info.group);
}
Evas_Object *popup = __t__get_moments_do_not_disturb_popup();
if (popup == NULL) {
- TEST_ASSERT_TRUE_UPGRADE(s_info.current_button != NULL);
+ TEST_ASSERT_TRUE(s_info.current_button != NULL);
s_info.current_button->pressed(s_info.current_button, NULL, NULL, NULL);
TEST_CASE_CONTINUE(0.2, __case_check_ok_button_clicked_on_do_not_disturb_popup, NULL);
}
- TEST_ASSERT_TRUE_UPGRADE(popup != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(popup));
+ TEST_ASSERT_TRUE(popup != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(popup));
double val = 0.0;
- TEST_ASSERT_EQUAL_STRING_UPGRADE("default", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
+ TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
__t__do_not_disturb_popup_ok_cb((void*)popup, NULL, NULL);
unit_case_func_t __continue_check_ok_button_clicked_on_do_not_disturb_popup(void * data)
{
Evas_Object *popup = __t__get_moments_do_not_disturb_popup();
- TEST_ASSERT_TRUE_UPGRADE(popup == NULL);
+ TEST_ASSERT_TRUE(popup == NULL);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+ TEST_ASSERT_TRUE(moments_get_visible() == false);
double val = 0.0;
- TEST_ASSERT_EQUAL_STRING_UPGRADE("on", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
+ TEST_ASSERT_EQUAL_STRING("on", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
TEST_CASE_DONE(s_info.group);
}
unit_case_func_t __case_check_flight_mode(void * data)
{
Eina_List *button_list = __t__get_moments_control_button_list();
- TEST_ASSERT_TRUE_UPGRADE(button_list != NULL);
+ TEST_ASSERT_TRUE(button_list != NULL);
Eina_List *l = NULL;
control_info_t *button = NULL;
}
}
- TEST_ASSERT_TRUE_UPGRADE(button != NULL);
+ TEST_ASSERT_TRUE(button != NULL);
s_info.current_button = button;
double val = 0.0;
- TEST_ASSERT_EQUAL_STRING_UPGRADE("default", edje_object_part_state_get(elm_layout_edje_get(button->button_layout), CONTROLS_BAR, &val));
+ TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(button->button_layout), CONTROLS_BAR, &val));
- TEST_ASSERT_TRUE_UPGRADE(button->pressed != NULL);
+ TEST_ASSERT_TRUE(button->pressed != NULL);
button->pressed(NULL, NULL, NULL, NULL);
unit_case_func_t __continue_check_flight_mode(void * data)
{
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+ TEST_ASSERT_TRUE(moments_get_visible() == false);
Evas_Object *popup = __t__get_moments_flight_mode_popup();
- TEST_ASSERT_TRUE_UPGRADE(popup != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(popup));
+ TEST_ASSERT_TRUE(popup != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(popup));
Evas_Object *layout = __t__get_moments_flight_mode_popup_layout();
const char *title_text = elm_object_part_text_get(layout, "elm.text.title");
- TEST_ASSERT_TRUE_UPGRADE(title_text != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE("Flight mode", title_text);
+ TEST_ASSERT_TRUE(title_text != NULL);
+ TEST_ASSERT_EQUAL_STRING("Flight mode", title_text);
const char *contents_text = elm_object_part_text_get(layout, "elm.text");
- TEST_ASSERT_TRUE_UPGRADE(contents_text != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE("disables calls, messaging and all connections. To use Wi-Fi and Bluetooth, go to Settings.", contents_text);
+ TEST_ASSERT_TRUE(contents_text != NULL);
+ TEST_ASSERT_EQUAL_STRING("disables calls, messaging and all connections. To use Wi-Fi and Bluetooth, go to Settings.", contents_text);
Evas_Object *left_btn = elm_object_part_content_get(popup, "button1");
- TEST_ASSERT_TRUE_UPGRADE(left_btn != NULL);
+ TEST_ASSERT_TRUE(left_btn != NULL);
Evas_Object *left_btn_icon = elm_object_part_content_get(left_btn, "elm.swallow.content");
- TEST_ASSERT_TRUE_UPGRADE(left_btn_icon != NULL);
+ TEST_ASSERT_TRUE(left_btn_icon != NULL);
const char *left_icon_image = NULL;
elm_image_file_get(left_btn_icon, &left_icon_image , NULL);
- TEST_ASSERT_TRUE_UPGRADE(left_icon_image != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(IMAGEDIR"/tw_ic_popup_btn_delete.png", left_icon_image);
+ TEST_ASSERT_TRUE(left_icon_image != NULL);
+ TEST_ASSERT_EQUAL_STRING(IMAGEDIR"/tw_ic_popup_btn_delete.png", left_icon_image);
Evas_Object *right_btn = elm_object_part_content_get(popup, "button2");
- TEST_ASSERT_TRUE_UPGRADE(right_btn != NULL);
+ TEST_ASSERT_TRUE(right_btn != NULL);
Evas_Object *right_btn_icon = elm_object_part_content_get(right_btn, "elm.swallow.content");
- TEST_ASSERT_TRUE_UPGRADE(right_btn_icon != NULL);
+ TEST_ASSERT_TRUE(right_btn_icon != NULL);
const char *right_icon_image = NULL;
elm_image_file_get(right_btn_icon, &right_icon_image, NULL);
- TEST_ASSERT_TRUE_UPGRADE(right_icon_image != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(IMAGEDIR"/tw_ic_popup_btn_check.png", right_icon_image);
+ TEST_ASSERT_TRUE(right_icon_image != NULL);
+ TEST_ASSERT_EQUAL_STRING(IMAGEDIR"/tw_ic_popup_btn_check.png", right_icon_image);
__t__flight_mode_popup_cancel_cb((void*)popup, NULL, NULL);
{
Evas_Object *popup = __t__get_moments_flight_mode_popup();
if (popup == NULL) {
- TEST_ASSERT_TRUE_UPGRADE(s_info.current_button != NULL);
+ TEST_ASSERT_TRUE(s_info.current_button != NULL);
s_info.current_button->pressed(s_info.current_button, NULL, NULL, NULL);
TEST_CASE_CONTINUE(0.2, __case_check_cancel_button_clicked_on_flight_mode_popup, NULL);
}
- TEST_ASSERT_TRUE_UPGRADE(popup != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(popup));
+ TEST_ASSERT_TRUE(popup != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(popup));
__t__flight_mode_popup_cancel_cb((void*)popup, NULL, NULL);
unit_case_func_t __continue_check_cancel_button_clicked_on_flight_mode_popup(void * data)
{
Evas_Object *popup = __t__get_moments_flight_mode_popup();
- TEST_ASSERT_TRUE_UPGRADE(popup == NULL);
+ TEST_ASSERT_TRUE(popup == NULL);
double val = 0.0;
- TEST_ASSERT_EQUAL_STRING_UPGRADE("default", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
+ TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+ TEST_ASSERT_TRUE(moments_get_visible() == false);
TEST_CASE_DONE(s_info.group);
}
Evas_Object *popup = __t__get_moments_flight_mode_popup();
if (popup == NULL) {
- TEST_ASSERT_TRUE_UPGRADE(s_info.current_button != NULL);
+ TEST_ASSERT_TRUE(s_info.current_button != NULL);
s_info.current_button->pressed(s_info.current_button, NULL, NULL, NULL);
TEST_CASE_CONTINUE(0.2, __case_check_ok_button_clicked_on_flight_mode_popup, NULL);
}
- TEST_ASSERT_TRUE_UPGRADE(popup != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(popup));
+ TEST_ASSERT_TRUE(popup != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(popup));
double val = 0.0;
- TEST_ASSERT_EQUAL_STRING_UPGRADE("default", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
+ TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
__t__flight_mode_popup_ok_cb((void*)popup, NULL, NULL);
unit_case_func_t __continue_check_ok_button_clicked_on_flight_mode_popup(void * data)
{
Evas_Object *popup = __t__get_moments_flight_mode_popup();
- TEST_ASSERT_TRUE_UPGRADE(popup == NULL);
+ TEST_ASSERT_TRUE(popup == NULL);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+ TEST_ASSERT_TRUE(moments_get_visible() == false);
double val = 0.0;
- TEST_ASSERT_EQUAL_STRING_UPGRADE("on", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
+ TEST_ASSERT_EQUAL_STRING("on", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
TEST_CASE_DONE(s_info.group);
}
unit_case_func_t __case_check_volume(void * data)
{
Eina_List *button_list = __t__get_moments_control_button_list();
- TEST_ASSERT_TRUE_UPGRADE(button_list != NULL);
+ TEST_ASSERT_TRUE(button_list != NULL);
Eina_List *l = NULL;
control_info_t *button = NULL;
}
}
- TEST_ASSERT_TRUE_UPGRADE(button != NULL);
+ TEST_ASSERT_TRUE(button != NULL);
s_info.current_button = button;
const char *volume_text = elm_object_part_text_get(button->button_layout, CONTROLS_TEXT);
- TEST_ASSERT_EQUAL_STRING_UPGRADE("7", volume_text);
+ TEST_ASSERT_EQUAL_STRING("7", volume_text);
Evas_Object *icon = elm_object_part_content_get(button->button_layout, CONTROLS_ICON);
const char *icon_image = NULL;
elm_image_file_get(icon, &icon_image, NULL);
- TEST_ASSERT_TRUE_UPGRADE(icon_image != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(IMAGEDIR"/multimedia.png", icon_image);
+ TEST_ASSERT_TRUE(icon_image != NULL);
+ TEST_ASSERT_EQUAL_STRING(IMAGEDIR"/multimedia.png", icon_image);
- TEST_ASSERT_TRUE_UPGRADE(button->pressed != NULL);
+ TEST_ASSERT_TRUE(button->pressed != NULL);
button->pressed(NULL, NULL, NULL, NULL);
unit_case_func_t __continue_check_volume(void * data)
{
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+ TEST_ASSERT_TRUE(moments_get_visible() == false);
app_context_h setting_app_context = NULL;
int ret = APP_MANAGER_ERROR_NONE;
ret = app_manager_get_app_context("org.tizen.watch-setting", &setting_app_context);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+ TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
app_state_e setting_app_state = APP_STATE_UNDEFINED;
ret = app_context_get_app_state(setting_app_context , &setting_app_state);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+ TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_STATE_FOREGROUND, setting_app_state);
+ TEST_ASSERT_EQUAL_INT(APP_STATE_FOREGROUND, setting_app_state);
app_context_h home_app_context = NULL;
ret = app_manager_get_app_context(PACKAGE, &home_app_context);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+ TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
app_state_e home_app_state = APP_STATE_UNDEFINED;
ret = app_context_get_app_state(home_app_context , &home_app_state);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+ TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_STATE_BACKGROUND, home_app_state);
+ TEST_ASSERT_EQUAL_INT(APP_STATE_BACKGROUND, home_app_state);
ret = app_manager_resume_app(home_app_context);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+ TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
ret = app_manager_request_terminate_bg_app(setting_app_context);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+ TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
ret = app_context_destroy(home_app_context);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+ TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
ret = app_context_destroy(setting_app_context);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+ TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
TEST_CASE_DONE(s_info.group);
}
TEST_CASE_CONTINUE(0.6, __case_check_volume_sound, NULL);
}
- TEST_ASSERT_EQUAL_STRING_UPGRADE("2", volume_text);
+ TEST_ASSERT_EQUAL_STRING("2", volume_text);
Evas_Object *icon = elm_object_part_content_get(s_info.current_button->button_layout, CONTROLS_ICON);
const char *icon_image = NULL;
elm_image_file_get(icon, &icon_image, NULL);
- TEST_ASSERT_TRUE_UPGRADE(icon_image != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(IMAGEDIR"/multimedia.png", icon_image);
+ TEST_ASSERT_TRUE(icon_image != NULL);
+ TEST_ASSERT_EQUAL_STRING(IMAGEDIR"/multimedia.png", icon_image);
TEST_CASE_DONE(s_info.group);
}
TEST_CASE_CONTINUE(0.6, __case_check_volume_mute, NULL);
}
- TEST_ASSERT_EQUAL_STRING_UPGRADE("0", volume_text);
+ TEST_ASSERT_EQUAL_STRING("0", volume_text);
Evas_Object *icon = elm_object_part_content_get(s_info.current_button->button_layout, CONTROLS_ICON);
const char *icon_image = NULL;
elm_image_file_get(icon, &icon_image, NULL);
- TEST_ASSERT_TRUE_UPGRADE(icon_image != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(IMAGEDIR"/multimedia_off.png", icon_image);
+ TEST_ASSERT_TRUE(icon_image != NULL);
+ TEST_ASSERT_EQUAL_STRING(IMAGEDIR"/multimedia_off.png", icon_image);
TEST_CASE_DONE(s_info.group);
}
unit_case_func_t __case_check_brightness(void * data)
{
Eina_List *button_list = __t__get_moments_control_button_list();
- TEST_ASSERT_TRUE_UPGRADE(button_list != NULL);
+ TEST_ASSERT_TRUE(button_list != NULL);
Eina_List *l = NULL;
control_info_t *button = NULL;
}
}
- TEST_ASSERT_TRUE_UPGRADE(button != NULL);
+ TEST_ASSERT_TRUE(button != NULL);
s_info.current_button = button;
const char *brightness_text = elm_object_part_text_get(button->button_layout, CONTROLS_TEXT);
- TEST_ASSERT_EQUAL_STRING_UPGRADE("7", brightness_text);
+ TEST_ASSERT_EQUAL_STRING("7", brightness_text);
Evas_Object *icon = elm_object_part_content_get(button->button_layout, CONTROLS_ICON);
const char *icon_image = NULL;
elm_image_file_get(icon, &icon_image, NULL);
- TEST_ASSERT_TRUE_UPGRADE(icon_image != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(IMAGEDIR"/brightness.png", icon_image);
+ TEST_ASSERT_TRUE(icon_image != NULL);
+ TEST_ASSERT_EQUAL_STRING(IMAGEDIR"/brightness.png", icon_image);
- TEST_ASSERT_TRUE_UPGRADE(button->pressed != NULL);
+ TEST_ASSERT_TRUE(button->pressed != NULL);
button->pressed(NULL, NULL, NULL, NULL);
unit_case_func_t __continue_check_brightness(void * data)
{
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+ TEST_ASSERT_TRUE(moments_get_visible() == false);
app_context_h setting_app_context = NULL;
int ret = APP_MANAGER_ERROR_NONE;
ret = app_manager_get_app_context("org.tizen.watch-setting", &setting_app_context);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+ TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
app_state_e setting_app_state = APP_STATE_UNDEFINED;
ret = app_context_get_app_state(setting_app_context , &setting_app_state);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+ TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_STATE_FOREGROUND, setting_app_state);
+ TEST_ASSERT_EQUAL_INT(APP_STATE_FOREGROUND, setting_app_state);
app_context_h home_app_context = NULL;
ret = app_manager_get_app_context(PACKAGE, &home_app_context);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+ TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
app_state_e home_app_state = APP_STATE_UNDEFINED;
ret = app_context_get_app_state(home_app_context , &home_app_state);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+ TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_STATE_BACKGROUND, home_app_state);
+ TEST_ASSERT_EQUAL_INT(APP_STATE_BACKGROUND, home_app_state);
ret = app_manager_resume_app(home_app_context);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+ TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
ret = app_manager_request_terminate_bg_app(setting_app_context);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+ TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
ret = app_context_destroy(home_app_context);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+ TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
ret = app_context_destroy(setting_app_context);
- TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+ TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
TEST_CASE_DONE(s_info.group);
}
static unit_case_func_t __case_show_control_button(void * data)
{
Evas_Object *control_layout = __t__get_moments_control_layout();
- TEST_ASSERT_TRUE_UPGRADE(control_layout != NULL);
+ TEST_ASSERT_TRUE(control_layout != NULL);
moments_control_clear_button_list();
for (i=0; i< count ; i++) {
control_info_t *new_button = moments_control_create_button(control_layout, i);
- TEST_ASSERT_TRUE_UPGRADE(new_button != NULL);
- TEST_ASSERT_TRUE_UPGRADE(new_button->button_layout != NULL);
+ TEST_ASSERT_TRUE(new_button != NULL);
+ TEST_ASSERT_TRUE(new_button->button_layout != NULL);
moments_control_push_to_button_list(new_button);
}
static unit_case_func_t __continue_check_control_button(void * data)
{
Eina_List *button_list = __t__get_moments_control_button_list();
- TEST_ASSERT_TRUE_UPGRADE(button_list != NULL);
+ TEST_ASSERT_TRUE(button_list != NULL);
int i = 0;
int count = (int)data;
for (i=0; i<count ; i++) {
control_info_t *button = eina_list_nth(button_list, i);
- TEST_ASSERT_TRUE_UPGRADE(button->button_layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(button->button_layout));
+ TEST_ASSERT_TRUE(button->button_layout != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(button->button_layout));
int x = 0, y = 0, w = 0, h = 0;
evas_object_geometry_get(button->button_layout, &x, &y, &w, &h);
int total = eina_list_count(button_list);
position_t *pos = moments_control_get_button_position(total, i);
- TEST_ASSERT_EQUAL_INT_UPGRADE(pos->x, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(pos->y, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_BUTTON_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_BUTTON_H, h);
+ TEST_ASSERT_EQUAL_INT(pos->x, x);
+ TEST_ASSERT_EQUAL_INT(pos->y, y);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_BUTTON_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_BUTTON_H, h);
}
TEST_CASE_DONE(s_info.group);
unit_case_func_t __continue_check_state(void * data)
{
Eina_List *button_list = __t__get_moments_control_button_list();
- TEST_ASSERT_TRUE_UPGRADE(button_list != NULL);
+ TEST_ASSERT_TRUE(button_list != NULL);
control_info_t *button = NULL;
for (i = 0; i < total; i++) {
button = eina_list_nth(button_list, i);
- TEST_ASSERT_TRUE_UPGRADE(button != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(button->button_layout));
+ TEST_ASSERT_TRUE(button != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(button->button_layout));
- TEST_ASSERT_EQUAL_INT_UPGRADE(expected_index[i], button->index);
+ TEST_ASSERT_EQUAL_INT(expected_index[i], button->index);
pos = moments_control_get_button_position(total, i);
evas_object_geometry_get(button->button_layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(pos->x, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(pos->y, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_BUTTON_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_BUTTON_H, h);
+ TEST_ASSERT_EQUAL_INT(pos->x, x);
+ TEST_ASSERT_EQUAL_INT(pos->y, y);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_BUTTON_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_BUTTON_H, h);
}
TEST_CASE_DONE(s_info.group);
{
if (moments_get_visible()) {
moments_hide();
+
ecore_timer_add(0.6, s_info.group->tear_down_complete, s_info.group);
return ;
}
static unit_case_func_t __case_check_hide(void *data)
{
Evas_Object *background_layout = __t__get_moments_view_layout();
- TEST_ASSERT_TRUE_UPGRADE(background_layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(background_layout) == EINA_FALSE);
+ TEST_ASSERT_TRUE(background_layout != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(background_layout) == EINA_FALSE);
int x = 0, y = 0, w = 0, h = 0;
evas_object_geometry_get(background_layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_X, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_X, x);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, y);
+ TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+ TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
Evas_Object *status_layout = __t__get_moments_status_layout();
- TEST_ASSERT_TRUE_UPGRADE(status_layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(status_layout) == EINA_FALSE);
+ TEST_ASSERT_TRUE(status_layout != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(status_layout) == EINA_FALSE);
evas_object_geometry_get(status_layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_X, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_INIT_H, h);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_X, x);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, y);
+ TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_INIT_H, h);
Evas_Object *status_grid = __t__get_moments_status_grid();
- TEST_ASSERT_TRUE_UPGRADE(status_grid != NULL);
- TEST_ASSERT_TRUE_UPGRADE(elm_object_part_content_get(status_layout, STATUS_CONTENT) != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(status_grid) == EINA_TRUE);
+ TEST_ASSERT_TRUE(status_grid != NULL);
+ TEST_ASSERT_TRUE(elm_object_part_content_get(status_layout, STATUS_CONTENT) != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(status_grid) == EINA_TRUE);
evas_object_geometry_get(status_grid, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_X, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_INIT_H, h);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_X, x);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, y);
+ TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_INIT_H, h);
Evas_Object *status_battery = __t__get_moments_status_battery();
- TEST_ASSERT_TRUE_UPGRADE(status_battery != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(status_battery));
+ TEST_ASSERT_TRUE(status_battery != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(status_battery));
evas_object_geometry_get(status_battery, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_X + MOMENTS_STATUS_BATTERY_ICON_X, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y + MOMENTS_STATUS_BATTERY_ICON_Y, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_H, h);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_X + MOMENTS_STATUS_BATTERY_ICON_X, x);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_Y + MOMENTS_STATUS_BATTERY_ICON_Y, y);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_H, h);
Evas_Object *center_layout = __t__get_moments_center_layout();
- TEST_ASSERT_TRUE_UPGRADE(center_layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(center_layout) == EINA_TRUE);
+ TEST_ASSERT_TRUE(center_layout != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(center_layout) == EINA_TRUE);
evas_object_geometry_get(center_layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_X + MOMENTS_CENTER_X, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y + MOMENTS_CENTER_Y, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_CENTER_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_CENTER_H, h);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_X + MOMENTS_CENTER_X, x);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_Y + MOMENTS_CENTER_Y, y);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_CENTER_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_CENTER_H, h);
Evas_Object *control_layout = __t__get_moments_control_layout();
- TEST_ASSERT_TRUE_UPGRADE(control_layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(control_layout) == EINA_TRUE);
+ TEST_ASSERT_TRUE(control_layout != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(control_layout) == EINA_TRUE);
evas_object_geometry_get(control_layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_X, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_X, x);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, y);
+ TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+ TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
TEST_CASE_DONE(s_info.group);
}
static unit_case_func_t __continue_check_half(void *data)
{
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
Evas_Object *background_layout = __t__get_moments_view_layout();
- TEST_ASSERT_TRUE_UPGRADE(background_layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(background_layout) == EINA_TRUE);
+ TEST_ASSERT_TRUE(background_layout != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(background_layout) == EINA_TRUE);
int x = 0, y = 0, w = 0, h = 0;
evas_object_geometry_get(background_layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(-WINDOW_H + MOMENTS_INIT_H, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h);
+ TEST_ASSERT_EQUAL_INT(0, x);
+ TEST_ASSERT_EQUAL_INT(-WINDOW_H + MOMENTS_INIT_H, y);
+ TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+ TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
Evas_Object *status_layout = __t__get_moments_status_layout();
- TEST_ASSERT_TRUE_UPGRADE(status_layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(status_layout) == EINA_TRUE);
+ TEST_ASSERT_TRUE(status_layout != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(status_layout) == EINA_TRUE);
evas_object_geometry_get(status_layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_INIT_H, h);
+ TEST_ASSERT_EQUAL_INT(0, x);
+ TEST_ASSERT_EQUAL_INT(0, y);
+ TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_INIT_H, h);
Evas_Object *status_grid = __t__get_moments_status_grid();
- TEST_ASSERT_TRUE_UPGRADE(status_grid != NULL);
- TEST_ASSERT_TRUE_UPGRADE(elm_object_part_content_get(status_layout, STATUS_CONTENT) != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(status_grid) == EINA_TRUE);
+ TEST_ASSERT_TRUE(status_grid != NULL);
+ TEST_ASSERT_TRUE(elm_object_part_content_get(status_layout, STATUS_CONTENT) != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(status_grid) == EINA_TRUE);
evas_object_geometry_get(status_grid, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_INIT_H, h);
+ TEST_ASSERT_EQUAL_INT(0, x);
+ TEST_ASSERT_EQUAL_INT(0, y);
+ TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_INIT_H, h);
Evas_Object *status_battery = __t__get_moments_status_battery();
- TEST_ASSERT_TRUE_UPGRADE(status_battery != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(status_battery) == EINA_TRUE);
+ TEST_ASSERT_TRUE(status_battery != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(status_battery) == EINA_TRUE);
evas_object_geometry_get(status_battery, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_X, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_Y, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_H, h);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_X, x);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_Y, y);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_H, h);
Evas_Object *center_layout = __t__get_moments_center_layout();
- TEST_ASSERT_TRUE_UPGRADE(center_layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(center_layout) == EINA_TRUE);
+ TEST_ASSERT_TRUE(center_layout != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(center_layout) == EINA_TRUE);
evas_object_geometry_get(center_layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_CENTER_X, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE((-WINDOW_H + MOMENTS_INIT_H) + MOMENTS_CENTER_Y, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_CENTER_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_CENTER_H, h);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_CENTER_X, x);
+ TEST_ASSERT_EQUAL_INT((-WINDOW_H + MOMENTS_INIT_H) + MOMENTS_CENTER_Y, y);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_CENTER_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_CENTER_H, h);
Evas_Object *control_layout = __t__get_moments_control_layout();
- TEST_ASSERT_TRUE_UPGRADE(control_layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(control_layout) == EINA_TRUE);
+ TEST_ASSERT_TRUE(control_layout != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(control_layout) == EINA_TRUE);
evas_object_geometry_get(control_layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(-WINDOW_H + MOMENTS_INIT_H, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h);
+ TEST_ASSERT_EQUAL_INT(0, x);
+ TEST_ASSERT_EQUAL_INT(-WINDOW_H + MOMENTS_INIT_H, y);
+ TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+ TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
TEST_CASE_DONE(s_info.group);
}
static unit_case_func_t __continue_check_full(void *data)
{
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
Evas_Object *background_layout = __t__get_moments_view_layout();
- TEST_ASSERT_TRUE_UPGRADE(background_layout != NULL);
+ TEST_ASSERT_TRUE(background_layout != NULL);
int x = 0, y = 0, w = 0, h = 0;
evas_object_geometry_get(background_layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h);
+ TEST_ASSERT_EQUAL_INT(0, x);
+ TEST_ASSERT_EQUAL_INT(0, y);
+ TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+ TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
Evas_Object *status_layout = __t__get_moments_status_layout();
- TEST_ASSERT_TRUE_UPGRADE(status_layout != NULL);
+ TEST_ASSERT_TRUE(status_layout != NULL);
evas_object_geometry_get(status_layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_INIT_H, h);
+ TEST_ASSERT_EQUAL_INT(0, x);
+ TEST_ASSERT_EQUAL_INT(0, y);
+ TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_INIT_H, h);
Evas_Object *center_layout = __t__get_moments_center_layout();
- TEST_ASSERT_TRUE_UPGRADE(center_layout != NULL);
+ TEST_ASSERT_TRUE(center_layout != NULL);
evas_object_geometry_get(center_layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_CENTER_X, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_CENTER_Y, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_CENTER_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_CENTER_H, h);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_CENTER_X, x);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_CENTER_Y, y);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_CENTER_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_CENTER_H, h);
Evas_Object *control_layout = __t__get_moments_control_layout();
- TEST_ASSERT_TRUE_UPGRADE(control_layout != NULL);
+ TEST_ASSERT_TRUE(control_layout != NULL);
evas_object_geometry_get(control_layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h);
+ TEST_ASSERT_EQUAL_INT(0, x);
+ TEST_ASSERT_EQUAL_INT(0, y);
+ TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+ TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
TEST_CASE_DONE(s_info.group);
}
static unit_case_func_t __continue_check_bar_state_hide(void * data);
static unit_case_func_t __case_drag_down_short_upgrade(void * data)
{
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
static int dest_y = 70;
TEST_CASE_CONTINUE(0.6, __continue_drag, &dest_y);
int dest_y = *(int *)data;
Evas_Object * layout = __t__get_moments_view_layout();
- TEST_ASSERT_TRUE_UPGRADE(layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(layout != NULL);
+ TEST_ASSERT_TRUE(moments_get_visible());
__t__background_layout_mouse_move(START_X, dest_y);
int dest_y = *(int *)data;
main_s * info = main_get_info();
- TEST_ASSERT_TRUE_UPGRADE(info != NULL);
- TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+ TEST_ASSERT_TRUE(info != NULL);
+ TEST_ASSERT_TRUE(info->layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
__t__layout_mouse_up(info->layout, START_X, dest_y);
static unit_case_func_t __continue_check_bar_state_hide(void * data)
{
Evas_Object * layout = __t__get_moments_view_layout();
- TEST_ASSERT_TRUE_UPGRADE(layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(layout) == EINA_FALSE);
+ TEST_ASSERT_TRUE(layout != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(layout) == EINA_FALSE);
int x = 0, y = 0, w = 0, h = 0;
evas_object_geometry_get(layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_X, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_X, x);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, y);
+ TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+ TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
TEST_CASE_DONE(s_info.group);
}
static unit_case_func_t __continue_move_up(void * data);
static unit_case_func_t __case_check_layout_movement(void * data)
{
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
current_step = 0;
TEST_CASE_CONTINUE(0.6, __continue_move_down, NULL);
}
main_s * info = main_get_info();
- TEST_ASSERT_TRUE_UPGRADE(info != NULL);
- TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+ TEST_ASSERT_TRUE(info != NULL);
+ TEST_ASSERT_TRUE(info->layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == true);
+ TEST_ASSERT_TRUE(moments_get_visible() == true);
__t__layout_mouse_move(info->layout, START_X, START_Y + (current_step * DRAW_INC));
current_step -= 1;
main_s * info = main_get_info();
- TEST_ASSERT_TRUE_UPGRADE(info != NULL);
- TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+ TEST_ASSERT_TRUE(info != NULL);
+ TEST_ASSERT_TRUE(info->layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == true);
+ TEST_ASSERT_TRUE(moments_get_visible() == true);
__t__layout_mouse_move(info->layout, START_X, START_Y + (current_step * DRAW_INC));
static unit_case_func_t __case_drag_down_bottom(void * data)
{
main_s *info = main_get_info();
- TEST_ASSERT_TRUE_UPGRADE(info != NULL);
- TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+ TEST_ASSERT_TRUE(info != NULL);
+ TEST_ASSERT_TRUE(info->layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
__t__layout_mouse_move(info->layout, START_X, WINDOW_H - DRAW_INC);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
TEST_CASE_CONTINUE(0.1, __continue_drag_up_short, NULL);
}
static unit_case_func_t __continue_drag_up_short(void *data)
{
main_s *info = main_get_info();
- TEST_ASSERT_TRUE_UPGRADE(info != NULL);
- TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+ TEST_ASSERT_TRUE(info != NULL);
+ TEST_ASSERT_TRUE(info->layout != NULL);
int dest_y = WINDOW_H - DRAW_INC - (MOMENT_DRAW_LIMIT + 1);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
__t__layout_mouse_move(info->layout, START_X, dest_y);
int dest_y = *(int *)data;
main_s *info = main_get_info();
- TEST_ASSERT_TRUE_UPGRADE(info != NULL);
- TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+ TEST_ASSERT_TRUE(info != NULL);
+ TEST_ASSERT_TRUE(info->layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
__t__layout_mouse_up(info->layout, START_X, dest_y);
static unit_case_func_t __continue_check_bar_state_full(void *data)
{
Evas_Object *layout = __t__get_moments_view_layout();
- TEST_ASSERT_TRUE_UPGRADE(layout != NULL);
+ TEST_ASSERT_TRUE(layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(layout) == EINA_TRUE);
+ TEST_ASSERT_TRUE(evas_object_visible_get(layout) == EINA_TRUE);
int x = 0, y = 0, w = 0, h = 0;
evas_object_geometry_get(layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h);
+ TEST_ASSERT_EQUAL_INT(0, x);
+ TEST_ASSERT_EQUAL_INT(0, y);
+ TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+ TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
TEST_CASE_DONE(s_info.group);
}
{
int dest_y = DRAG_DOWN_BOUNDARY_Y -1;
main_s *info = main_get_info();
- TEST_ASSERT_TRUE_UPGRADE(info != NULL);
- TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+ TEST_ASSERT_TRUE(info != NULL);
+ TEST_ASSERT_TRUE(info->layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
__t__layout_mouse_move(info->layout, START_X, dest_y);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
TEST_CASE_CONTINUE(0.6, __continue_touch_up_and_check_hide, &dest_y);
}
{
int dest_y = DRAG_DOWN_BOUNDARY_Y;
main_s *info = main_get_info();
- TEST_ASSERT_TRUE_UPGRADE(info != NULL);
- TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+ TEST_ASSERT_TRUE(info != NULL);
+ TEST_ASSERT_TRUE(info->layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
__t__layout_mouse_move(info->layout, START_X, dest_y);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
TEST_CASE_CONTINUE(0.6, __continue_touch_up_and_check_full, &dest_y);
}
{
static int move_inc = 10;
main_s *info = main_get_info();
- TEST_ASSERT_TRUE_UPGRADE(info != NULL);
- TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+ TEST_ASSERT_TRUE(info != NULL);
+ TEST_ASSERT_TRUE(info->layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
__t__layout_mouse_move(info->layout, START_X, WINDOW_H - DRAW_INC);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
TEST_CASE_CONTINUE(0.1, __continue_touch_up_bottom, &move_inc);
}
static unit_case_func_t __continue_touch_up_bottom(void * data)
{
main_s *info = main_get_info();
- TEST_ASSERT_TRUE_UPGRADE(info != NULL);
- TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+ TEST_ASSERT_TRUE(info != NULL);
+ TEST_ASSERT_TRUE(info->layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
__t__layout_mouse_up(info->layout, START_X, WINDOW_H - DRAW_INC);
static unit_case_func_t __continue_check_bar_state_full_and_drag_up(void *data)
{
Evas_Object *layout = __t__get_moments_view_layout();
- TEST_ASSERT_TRUE_UPGRADE(layout != NULL);
+ TEST_ASSERT_TRUE(layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(layout) == EINA_TRUE);
+ TEST_ASSERT_TRUE(evas_object_visible_get(layout) == EINA_TRUE);
int x = 0, y = 0, w = 0, h = 0;
evas_object_geometry_get(layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h);
+ TEST_ASSERT_EQUAL_INT(0, x);
+ TEST_ASSERT_EQUAL_INT(0, y);
+ TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+ TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
TEST_CASE_CONTINUE(0.6, __continue_short_drag_start, data);
}
static unit_case_func_t __continue_short_drag_start(void *data)
{
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
__t__background_layout_mouse_down(START_X, MOMENTS_INIT_H);
__t__background_layout_mouse_move(START_X, DRAG_UP_BOUNDARY_Y);
{
int move_y = *(int *)data;
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
__t__background_layout_mouse_move(START_X, DRAG_UP_BOUNDARY_Y - move_y);
static unit_case_func_t __continue_short_drag_end_and_check_state(void * data)
{
int move_y = *(int *)data;
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
__t__background_layout_mouse_up(START_X, DRAG_UP_BOUNDARY_Y - move_y);
static int move_inc = 9;
main_s *info = main_get_info();
- TEST_ASSERT_TRUE_UPGRADE(info != NULL);
- TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+ TEST_ASSERT_TRUE(info != NULL);
+ TEST_ASSERT_TRUE(info->layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
__t__layout_mouse_move(info->layout, START_X, WINDOW_H - DRAW_INC);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
TEST_CASE_CONTINUE(0.1, __continue_touch_up_bottom, &move_inc);
}
position_t *pos = (position_t *)data;
main_s * info = main_get_info();
- TEST_ASSERT_TRUE_UPGRADE(info != NULL);
- TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+ TEST_ASSERT_TRUE(info != NULL);
+ TEST_ASSERT_TRUE(info->layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+ TEST_ASSERT_TRUE(moments_get_visible() == false);
__t__layout_mouse_down(info->layout, pos->x, pos->y);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
TEST_CASE_CONTINUE(0.6, __continue_check_bar_state_half, NULL);
}
static unit_case_func_t __continue_check_bar_state_half(void * data)
{
Evas_Object * layout = __t__get_moments_view_layout();
- TEST_ASSERT_TRUE_UPGRADE(layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(layout) == EINA_TRUE);
+ TEST_ASSERT_TRUE(layout != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(layout) == EINA_TRUE);
int x = 0, y = 0, w = 0, h = 0;
evas_object_geometry_get(layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE((-WINDOW_H + MOMENTS_INIT_H), y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h);
+ TEST_ASSERT_EQUAL_INT(0, x);
+ TEST_ASSERT_EQUAL_INT((-WINDOW_H + MOMENTS_INIT_H), y);
+ TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+ TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
TEST_CASE_DONE(s_info.group);
}
position_t *pos = (position_t *)data;
main_s * info = main_get_info();
- TEST_ASSERT_TRUE_UPGRADE(info != NULL);
- TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+ TEST_ASSERT_TRUE(info != NULL);
+ TEST_ASSERT_TRUE(info->layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+ TEST_ASSERT_TRUE(moments_get_visible() == false);
__t__layout_mouse_down(info->layout, pos->x, pos->y);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+ TEST_ASSERT_TRUE(moments_get_visible() == false);
TEST_CASE_DONE(s_info.group);
}
{
main_s * info = main_get_info();
__t__layout_mouse_down(info->layout, 180, 50);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
TEST_CASE_CONTINUE(0.6, __continue_touch_up, NULL);
}
static unit_case_func_t __continue_touch_up(void * data)
{
main_s * info = main_get_info();
- TEST_ASSERT_TRUE_UPGRADE(info != NULL);
- TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+ TEST_ASSERT_TRUE(info != NULL);
+ TEST_ASSERT_TRUE(info->layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible());
__t__layout_mouse_up(info->layout, 180, 50);
- TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+ TEST_ASSERT_TRUE(moments_get_visible() == false);
TEST_CASE_CONTINUE(0.6, __continue_check_bar_state_hide, NULL);
}
static unit_case_func_t __continue_check_bar_state_hide(void * data)
{
Evas_Object * layout = __t__get_moments_view_layout();
- TEST_ASSERT_TRUE_UPGRADE(layout != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(layout) == EINA_FALSE);
+ TEST_ASSERT_TRUE(layout != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(layout) == EINA_FALSE);
int x = 0, y = 0, w = 0, h = 0;
evas_object_geometry_get(layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_X, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_X, x);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, y);
+ TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+ TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
TEST_CASE_DONE(s_info.group);
}
static unit_case_func_t __case_check_status_flighton_serviceoff_wifioff(void *data)
{
main_s *info = main_get_info();
- TEST_ASSERT_TRUE_UPGRADE(info != NULL);
+ TEST_ASSERT_TRUE(info != NULL);
Evas_Object *layout = __t__get_moments_status_layout();
- TEST_ASSERT_TRUE_UPGRADE(layout != NULL);
+ TEST_ASSERT_TRUE(layout != NULL);
Evas_Object *callsignal = __t__get_moments_status_callsignal();
if (!callsignal) {
}
__t__layout_mouse_down(info->layout, 180, 50);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(layout) == true);
+ TEST_ASSERT_TRUE(evas_object_visible_get(layout) == true);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(callsignal));
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(network));
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(location));
+ TEST_ASSERT_TRUE(evas_object_visible_get(callsignal));
+ TEST_ASSERT_TRUE(evas_object_visible_get(network));
+ TEST_ASSERT_TRUE(evas_object_visible_get(location));
TEST_CASE_CONTINUE(0.6, __continue_check_status_flighton_serviceoff_wifioff, NULL);
}
TEST_CASE_CONTINUE(0.6, __continue_check_status_flighton_serviceoff_wifioff, NULL);
}
- TEST_ASSERT_EQUAL_STRING_UPGRADE("flight_mode", edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
- TEST_ASSERT_EQUAL_STRING_UPGRADE("hide", edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
- TEST_ASSERT_EQUAL_STRING_UPGRADE("hide", edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING("flight_mode", edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING("hide", edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING("hide", edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
Evas_Object *location = __t__get_moments_status_location();
- TEST_ASSERT_TRUE_UPGRADE(!location);
+ TEST_ASSERT_TRUE(!location);
TEST_CASE_DONE(s_info.group);
}
TEST_CASE_CONTINUE(0.2, __case_check_status_flightoff_serviceoff_wifioff, NULL);
}
- TEST_ASSERT_TRUE_UPGRADE(location != NULL);
+ TEST_ASSERT_TRUE(location != NULL);
__t__moments_manager_update_status_view(0, 1, 0);
TEST_CASE_CONTINUE(0.6, __continue_check_status_flightoff_serviceoff_wifioff, NULL);
Evas_Object *callsignal = __t__get_moments_status_callsignal();
Evas_Object *network = __t__get_moments_status_network();
- TEST_ASSERT_EQUAL_STRING_UPGRADE("default", edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
- TEST_ASSERT_EQUAL_STRING_UPGRADE("hide", edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
- TEST_ASSERT_EQUAL_STRING_UPGRADE("hide", edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING("hide", edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING("hide", edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
Evas_Object *location = __t__get_moments_status_location();
- TEST_ASSERT_TRUE_UPGRADE(!location);
+ TEST_ASSERT_TRUE(!location);
TEST_CASE_DONE(s_info.group);
}
__t__moments_get_callsignal_state(&roaming, &strength);
__t__moments_get_network_strength_and_packet_type(&network_type, &packet_type);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(__t__callsignal_array[strength][roaming], edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
- TEST_ASSERT_EQUAL_STRING_UPGRADE(__t__network_type[network_type], edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
- TEST_ASSERT_EQUAL_STRING_UPGRADE(__t__network_type[network_type == 0 ? network_type : packet_type+15], edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING(__t__callsignal_array[strength][roaming], edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING(__t__network_type[network_type], edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING(__t__network_type[network_type == 0 ? network_type : packet_type+15], edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
TEST_CASE_DONE(s_info.group);
}
__t__moments_get_callsignal_state(&roaming, &strength);
__t__moments_get_wifi_strength_and_packet_type(&network_type, &packet_type);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(__t__callsignal_array[strength][roaming], edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
- TEST_ASSERT_EQUAL_STRING_UPGRADE(__t__network_type[network_type+10], edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
- TEST_ASSERT_EQUAL_STRING_UPGRADE(__t__network_type[packet_type+15], edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING(__t__callsignal_array[strength][roaming], edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING(__t__network_type[network_type+10], edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING(__t__network_type[packet_type+15], edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
TEST_CASE_DONE(s_info.group);
}
__t__moments_get_callsignal_state(&roaming, &strength);
__t__moments_get_wifi_strength_and_packet_type(&network_type, &packet_type);
- TEST_ASSERT_EQUAL_STRING_UPGRADE("default", edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
- TEST_ASSERT_EQUAL_STRING_UPGRADE(__t__network_type[network_type+10], edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
- TEST_ASSERT_EQUAL_STRING_UPGRADE(__t__network_type[packet_type+15], edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING(__t__network_type[network_type+10], edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING(__t__network_type[packet_type+15], edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
- TEST_ASSERT_TRUE_UPGRADE(!evas_object_visible_get(location));
+ TEST_ASSERT_TRUE(!evas_object_visible_get(location));
TEST_CASE_DONE(s_info.group);
}
static unit_case_func_t __case_check_status_view_battery(void *data)
{
Evas_Object *battery = __t__get_moments_status_battery();
- TEST_ASSERT_TRUE_UPGRADE(battery != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(battery));
+ TEST_ASSERT_TRUE(battery != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(battery));
int x, y, w, h;
evas_object_geometry_get(battery, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_X, x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_Y, y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_H, h);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_X, x);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_Y, y);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_H, h);
static int percent = 0;
__set_battery_percent(percent);
int percent = *(int *)data;
Evas_Object *layout = __t__get_moments_status_layout();
- TEST_ASSERT_TRUE_UPGRADE(layout != NULL);
+ TEST_ASSERT_TRUE(layout != NULL);
Evas_Object *battery = __t__get_moments_status_battery();
- TEST_ASSERT_TRUE_UPGRADE(battery != NULL);
+ TEST_ASSERT_TRUE(battery != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(battery_text, elm_object_part_text_get(layout, "txt.battery"));
- TEST_ASSERT_EQUAL_STRING_UPGRADE(battery_percent, edje_object_part_state_get(elm_layout_edje_get(battery), "icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING(battery_text, elm_object_part_text_get(layout, "txt.battery"));
+ TEST_ASSERT_EQUAL_STRING(battery_percent, edje_object_part_state_get(elm_layout_edje_get(battery), "icon_image", &val));
if (percent % 2) {
- TEST_ASSERT_EQUAL_STRING_UPGRADE("show", edje_object_part_state_get(elm_layout_edje_get(battery), "battery_charge_image", &val));
+ TEST_ASSERT_EQUAL_STRING("show", edje_object_part_state_get(elm_layout_edje_get(battery), "battery_charge_image", &val));
} else {
- TEST_ASSERT_EQUAL_STRING_UPGRADE("default", edje_object_part_state_get(elm_layout_edje_get(battery), "battery_charge_image", &val));
+ TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(battery), "battery_charge_image", &val));
}
if (percent >= 100) {
TEST_CASE_CONTINUE(0.1, __case_check_status_view_callsignal, NULL);
}
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(callsignal));
+ TEST_ASSERT_TRUE(evas_object_visible_get(callsignal));
int index = __t__get_moments_status_icon_index(STATUS_ICON_CALLSIGNAL);
- TEST_ASSERT_EQUAL_INT_UPGRADE(STATUS_ICON_CALLSIGNAL, index);
+ TEST_ASSERT_EQUAL_INT(STATUS_ICON_CALLSIGNAL, index);
int x, y, w, h;
evas_object_geometry_get(callsignal, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][0], x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][1], y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_H, h);
+ TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][0], x);
+ TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][1], y);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_H, h);
moments_status_callsignal_update(call_strength, is_roaming);
int strength = *(int *)data;
double val = 0.0;
Evas_Object *callsignal = __t__get_moments_status_callsignal();
- TEST_ASSERT_TRUE_UPGRADE(callsignal != NULL);
+ TEST_ASSERT_TRUE(callsignal != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(__callsignal_type[call_signal_index], edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING(__callsignal_type[call_signal_index], edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
if (strength == 5 && !is_roaming) {
TEST_CASE_DONE(s_info.group);
TEST_CASE_CONTINUE(0.1, __case_check_status_view_network, NULL);
}
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(network));
+ TEST_ASSERT_TRUE(evas_object_visible_get(network));
int index = __t__get_moments_status_icon_index(STATUS_ICON_NETWORK);
- TEST_ASSERT_EQUAL_INT_UPGRADE(STATUS_ICON_NETWORK, index);
+ TEST_ASSERT_EQUAL_INT(STATUS_ICON_NETWORK, index);
int x, y, w, h;
evas_object_geometry_get(network, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][0], x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][1], y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_H, h);
+ TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][0], x);
+ TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][1], y);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_H, h);
moments_status_network_update(network_state.network_type, network_state.packet_type);
network_state.packet_type += 1;
network_state_t *network_state = (network_state_t *)data;
Evas_Object *network = __t__get_moments_status_network();
- TEST_ASSERT_TRUE_UPGRADE(network != NULL);
+ TEST_ASSERT_TRUE(network != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(__network_type[network_state->network_type], edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
- TEST_ASSERT_EQUAL_STRING_UPGRADE(__network_type[network_state->packet_type], edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING(__network_type[network_state->network_type], edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING(__network_type[network_state->packet_type], edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
if (network_state->network_type == 14 && network_state->packet_type == 18) {
TEST_CASE_DONE(s_info.group);
TEST_CASE_CONTINUE(0.3, __case_check_status_view_bluetooth, NULL);
}
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(bluetooth));
+ TEST_ASSERT_TRUE(evas_object_visible_get(bluetooth));
int index = __t__get_moments_status_icon_index(STATUS_ICON_BLUETOOTH);
- TEST_ASSERT_EQUAL_INT_UPGRADE(STATUS_ICON_BLUETOOTH, index);
+ TEST_ASSERT_EQUAL_INT(STATUS_ICON_BLUETOOTH, index);
int x, y, w, h;
evas_object_geometry_get(bluetooth, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][0], x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][1], y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_H, h);
+ TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][0], x);
+ TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][1], y);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_H, h);
moments_status_update_view();
moments_status_bluetooth_update(bt_on_off, bt_connected);
Evas_Object *bluetooth = (Evas_Object *)data;
if (bt_connected < 2) {
- TEST_ASSERT_EQUAL_STRING_UPGRADE(__bluetooth_state[bt_connected], edje_object_part_state_get(elm_layout_edje_get(bluetooth), "icon_image", &val));
+ TEST_ASSERT_EQUAL_STRING(__bluetooth_state[bt_connected], edje_object_part_state_get(elm_layout_edje_get(bluetooth), "icon_image", &val));
if (bt_connected == 1) { // This time we should show off state
bt_on_off = 0;
}
bluetooth = __t__get_moments_status_bluetooth();
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(bluetooth));
+ TEST_ASSERT_TRUE(evas_object_visible_get(bluetooth));
TEST_CASE_DONE(s_info.group);
}
TEST_CASE_CONTINUE(0.3, __case_check_status_view_headset, NULL);
}
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(headset));
+ TEST_ASSERT_TRUE(evas_object_visible_get(headset));
int index = __t__get_moments_status_icon_index(STATUS_ICON_HEADSET);
- TEST_ASSERT_EQUAL_INT_UPGRADE(STATUS_ICON_HEADSET, index);
+ TEST_ASSERT_EQUAL_INT(STATUS_ICON_HEADSET, index);
int x, y, w, h;
evas_object_geometry_get(headset, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][0], x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][1], y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_H, h);
+ TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][0], x);
+ TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][1], y);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_H, h);
moments_status_update_view();
if (data != NULL) {
Evas_Object *headset = (Evas_Object *)data;
- TEST_ASSERT_TRUE_UPGRADE(!evas_object_visible_get(headset));
+ TEST_ASSERT_TRUE(!evas_object_visible_get(headset));
moments_status_headset_icon_show();
moments_status_update_view();
} else {
Evas_Object *headset = __t__get_moments_status_headset();
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(headset));
+ TEST_ASSERT_TRUE(evas_object_visible_get(headset));
TEST_CASE_DONE(s_info.group);
}
TEST_CASE_CONTINUE(0.6, __case_check_status_view_simcard, NULL);
}
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(simcard));
+ TEST_ASSERT_TRUE(evas_object_visible_get(simcard));
int index = __t__get_moments_status_icon_index(STATUS_ICON_NO_SIM);
- TEST_ASSERT_EQUAL_INT_UPGRADE(STATUS_ICON_NO_SIM, index);
+ TEST_ASSERT_EQUAL_INT(STATUS_ICON_NO_SIM, index);
int x, y, w, h;
evas_object_geometry_get(simcard, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][0], x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][1], y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_H, h);
+ TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][0], x);
+ TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][1], y);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_H, h);
moments_status_simcard_icon_hide();
moments_status_update_view();
{
if (data != NULL) {
Evas_Object *simcard = (Evas_Object *)data;
- TEST_ASSERT_TRUE_UPGRADE(!evas_object_visible_get(simcard));
+ TEST_ASSERT_TRUE(!evas_object_visible_get(simcard));
moments_status_simcard_icon_show();
moments_status_update_view();
TEST_CASE_CONTINUE(0.6, __continue_check_status_simcard_icon_change, NULL);
} else {
Evas_Object *simcard = __t__get_moments_status_simcard();
- TEST_ASSERT_TRUE_UPGRADE(simcard != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(simcard));
+ TEST_ASSERT_TRUE(simcard != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(simcard));
}
TEST_CASE_DONE(s_info.group);
TEST_CASE_CONTINUE(0.3, __case_check_status_view_callforwarding, NULL);
}
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(callforwarding));
+ TEST_ASSERT_TRUE(evas_object_visible_get(callforwarding));
int index = __t__get_moments_status_icon_index(STATUS_ICON_CALLFORWARDING);
- TEST_ASSERT_EQUAL_INT_UPGRADE(STATUS_ICON_CALLFORWARDING, index);
+ TEST_ASSERT_EQUAL_INT(STATUS_ICON_CALLFORWARDING, index);
int x, y, w, h;
evas_object_geometry_get(callforwarding, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][0], x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][1], y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_H, h);
+ TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][0], x);
+ TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][1], y);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_H, h);
moments_status_update_view();
TEST_CASE_CONTINUE(0.6, __case_check_status_view_location, NULL);
}
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(location));
+ TEST_ASSERT_TRUE(evas_object_visible_get(location));
int index = __t__get_moments_status_icon_index(STATUS_ICON_LOCATION);
- TEST_ASSERT_EQUAL_INT_UPGRADE(index, STATUS_ICON_LOCATION);
+ TEST_ASSERT_EQUAL_INT(index, STATUS_ICON_LOCATION);
int x, y, w, h;
evas_object_geometry_get(location, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][0], x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][1], y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_W, w);
- TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_H, h);
+ TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][0], x);
+ TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][1], y);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_W, w);
+ TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_H, h);
moments_status_location_icon_hide();
moments_status_update_view();
{
if (data != NULL) {
Evas_Object *location = (Evas_Object *)data;
- TEST_ASSERT_TRUE_UPGRADE(!evas_object_visible_get(location));
+ TEST_ASSERT_TRUE(!evas_object_visible_get(location));
moments_status_location_icon_show();
moments_status_update_view();
TEST_CASE_CONTINUE(0.6, __continue_check_status_location_icon_change, NULL);
} else {
Evas_Object *location = __t__get_moments_status_location();
- TEST_ASSERT_TRUE_UPGRADE(location != NULL);
- TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(location));
+ TEST_ASSERT_TRUE(location != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(location));
}
TEST_CASE_DONE(s_info.group);
#include <Elementary.h>
#include <app.h>
-static void __case_touch_down_top(bool * is_passed);
-static void __case_drag_down(bool * is_passed);
-static void __case_drag_up(bool * is_passed);
-static void __case_touch_up(bool * is_passed);
-static void __case_touch_down_bottom(bool *is_passed);
-static void __case_check_content_alpha(bool * is_passed);
-
static struct {
- Ecore_Timer * group_timer;
unit_group_t * group;
- int current_case;
- int current_step;
- int last_mouse_x;
- int last_mouse_y;
- int mouse_down_y;
- void(*case_pool[TEST_CASE_MAX + 1])(bool * is_passed);
+ int move_y[20];
} s_info = {
- .group_timer = NULL,
.group = NULL,
- .current_case = 0,
- .current_step = 0,
- .last_mouse_x = 0,
- .last_mouse_y = 0,
- .mouse_down_y = 0,
- .case_pool = {
- __case_touch_down_top,
- __case_drag_down, /*[[----------*/
- __case_check_content_alpha, /* ------]] x 11 */
- __case_touch_up,
- __case_touch_down_bottom,
- __case_drag_up,
- __case_touch_up,
- NULL,
- },
+ .move_y = { 0, },
};
-static Eina_Bool __group_timer_callback(void * data);
-
-static int move_y[10] = { 0, };
-static void __set_up(void)
+static void __group_set_up(void)
{
- move_y[0] = MOMENT_BUTTON_VI_START_Y;
- move_y[1] = MOMENT_BUTTON_VI_START_Y + 1;
- move_y[2] = MOMENT_BUTTON_VI_START_Y;
- move_y[3] = (MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) / 4;
- move_y[4] = (MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) / 2;
- move_y[5] = (MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) * 3 / 4;
- move_y[6] = MOMENT_BUTTON_VI_END_Y - 1;
- move_y[7] = MOMENT_BUTTON_VI_END_Y;
- move_y[8] = MOMENT_BUTTON_VI_END_Y + 1;
- move_y[9] = -1;
+ s_info.move_y[0] = MOMENT_BUTTON_VI_START_Y;
+ s_info.move_y[1] = MOMENT_BUTTON_VI_START_Y + 1;
+ s_info.move_y[2] = MOMENT_BUTTON_VI_START_Y;
+ s_info.move_y[3] = (MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) / 4;
+ s_info.move_y[4] = (MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) / 2;
+ s_info.move_y[5] = (MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) * 3 / 4;
+ s_info.move_y[6] = MOMENT_BUTTON_VI_END_Y - 1;
+ s_info.move_y[7] = MOMENT_BUTTON_VI_END_Y;
+ s_info.move_y[8] = MOMENT_BUTTON_VI_END_Y + 1;
+ s_info.move_y[9] = -1;
+
+ s_info.move_y[18] = MOMENT_BUTTON_VI_START_Y;
+ s_info.move_y[17] = MOMENT_BUTTON_VI_START_Y + 1;
+ s_info.move_y[16] = MOMENT_BUTTON_VI_START_Y;
+ s_info.move_y[15] = (MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) / 4;
+ s_info.move_y[14] = (MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) / 2;
+ s_info.move_y[13] = (MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) * 3 / 4;
+ s_info.move_y[12] = MOMENT_BUTTON_VI_END_Y - 1;
+ s_info.move_y[11] = MOMENT_BUTTON_VI_END_Y;
+ s_info.move_y[10] = MOMENT_BUTTON_VI_END_Y + 1;
+ s_info.move_y[19] = -1;
+
+ TEST_GROUP_SET_UP_DONE(0.0, s_info.group);
}
-static void __tear_down(void) {}
-
-static void __case_touch_down_top(bool * is_passed)
-{
- main_s * info = main_get_info();
- TEST_ASSERT_TRUE(info != NULL);
- TEST_ASSERT_TRUE(info->layout != NULL);
-
- TEST_ASSERT_TRUE(moments_get_visible() == false);
-
- __t__layout_mouse_down(info->layout, WINDOW_W / 2, MOMENTS_INIT_H / 2);
- s_info.mouse_down_y = MOMENTS_INIT_H / 2;
-
- TEST_ASSERT_TRUE(moments_get_visible());
-
- Evas_Object * layout = __t__get_moments_status_layout();
-
- TEST_ASSERT_TRUE(layout != NULL);
- TEST_ASSERT_TRUE(evas_object_visible_get(layout) == EINA_TRUE);
-
- *is_passed = true;
-}
-
-
-static void __case_drag_down(bool * is_passed)
+static void __set_up(void)
{
- main_s * info = main_get_info();
- TEST_ASSERT_TRUE(info != NULL);
- TEST_ASSERT_TRUE(info->layout != NULL);
-
- TEST_ASSERT_TRUE(moments_get_visible() == true);
-
- __t__layout_mouse_move(info->layout, WINDOW_W / 2, move_y[s_info.current_step]);
+ if (moments_get_visible()) {
+ moments_hide();
- s_info.last_mouse_x = WINDOW_W / 2;
- s_info.last_mouse_y = move_y[s_info.current_step];
-
- s_info.current_step += 1;
+ ecore_timer_add(0.6, s_info.group->set_up_complete, s_info.group);
+ return ;
+ }
- *is_passed = true;
+ s_info.group->set_up_complete(s_info.group);
}
-static void __case_drag_up(bool * is_passed)
+static void __tear_down(void)
{
- s_info.current_step -= 1;
-
- main_s * info = main_get_info();
- TEST_ASSERT_TRUE(info != NULL);
- TEST_ASSERT_TRUE(info->layout != NULL);
+ if (moments_get_visible()) {
+ moments_hide();
- TEST_ASSERT_TRUE(moments_get_visible() == true);
-
- __t__layout_mouse_move(info->layout, WINDOW_W / 2, s_info.last_mouse_y - (s_info.current_step * DRAW_INC));
-
- s_info.last_mouse_x = WINDOW_W / 2;
- s_info.last_mouse_y = s_info.last_mouse_y - (s_info.current_step * DRAW_INC);
-
- *is_passed = true;
-
- if (s_info.current_step > 0 && s_info.current_step < 10) {
- s_info.current_case -= 1;
+ ecore_timer_add(0.6, s_info.group->tear_down_complete, s_info.group);
+ return ;
}
+ s_info.group->tear_down_complete(s_info.group);
}
-static void __case_touch_down_bottom(bool *is_passed)
+static unit_case_func_t __continue_check_content_alpha(void *data);
+static unit_case_func_t __case_drag_down(void *data)
{
- Evas_Object * layout = __t__get_moments_view_layout();
- TEST_ASSERT_TRUE(layout != NULL);
- TEST_ASSERT_TRUE(moments_get_visible());
-
- __t__background_layout_mouse_down(WINDOW_W / 2, WINDOW_H - DRAW_INC);
- __t__background_layout_mouse_move(WINDOW_W / 2, WINDOW_H - DRAW_INC - (MOMENT_DRAW_LIMIT + 1));
-
- s_info.mouse_down_y = WINDOW_H - DRAW_INC;
- s_info.last_mouse_x = WINDOW_W / 2;
- s_info.last_mouse_y = WINDOW_H - DRAW_INC - (MOMENT_DRAW_LIMIT + 1);
-
- TEST_ASSERT_TRUE(moments_get_visible());
+ TEST_ASSERT_TRUE(moments_get_visible() == false);
- *is_passed = true;
-}
+ Evas_Object * layout = __t__get_moments_status_layout();
+ TEST_ASSERT_TRUE(layout != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(layout) == false);
-static void __case_touch_up(bool * is_passed)
-{
main_s * info = main_get_info();
TEST_ASSERT_TRUE(info != NULL);
TEST_ASSERT_TRUE(info->layout != NULL);
+ __t__layout_mouse_down(info->layout, WINDOW_W / 2, MOMENTS_INIT_H / 2);
TEST_ASSERT_TRUE(moments_get_visible());
- __t__layout_mouse_up(info->layout, s_info.last_mouse_x, s_info.last_mouse_y);
-
- *is_passed = true;
+ TEST_CASE_CONTINUE(0.6, __continue_check_content_alpha, (void*)0);
}
-static void __case_check_content_alpha(bool * is_passed)
+static unit_case_func_t __continue_check_content_alpha(void *data)
{
Evas_Object * control_layout = __t__get_moments_control_layout();
TEST_ASSERT_TRUE(control_layout != NULL);
evas_object_color_get(center_layout, &r, &g, &b, &a);
TEST_ASSERT_EQUAL_INT(__t__get_center_layout_alpha(y + WINDOW_H), a);
+ main_s * info = main_get_info();
+ TEST_ASSERT_TRUE(info != NULL);
+ TEST_ASSERT_TRUE(info->layout != NULL);
+
+ TEST_ASSERT_TRUE(moments_get_visible() == true);
- if (move_y[s_info.current_step] != -1) {
- s_info.current_case -= 2;
+ if (s_info.move_y[(int)data] == -1) {
+ if ((int)data < 10)
+ __t__layout_mouse_up(info->layout, WINDOW_W / 2, s_info.move_y[(int)data - 1]);
+ else
+ __t__background_layout_mouse_up(WINDOW_W / 2, s_info.move_y[(int)data - 1]);
+
+ TEST_CASE_DONE(s_info.group);
}
- *is_passed = true;
+ if ((int)data < 10)
+ __t__layout_mouse_move(info->layout, WINDOW_W / 2, s_info.move_y[(int)data]);
+ else
+ __t__background_layout_mouse_move(WINDOW_W / 2, s_info.move_y[(int)data]);
+
+ TEST_CASE_CONTINUE(0.1, __continue_check_content_alpha, (void*)((int)data + 1));
}
-void group_feature_moments_vi(unit_group_t * group)
+static unit_case_func_t __continue_touch_down_bottom(void *data);
+static unit_case_func_t __case_drag_up(void *data)
{
- if (s_info.group_timer) {
- ecore_timer_del(s_info.group_timer);
- s_info.group_timer = NULL;
- }
+ TEST_ASSERT_TRUE(moments_get_visible() == false);
- s_info.current_step = 0;
- s_info.current_case = 0;
- s_info.group = group;
- s_info.group_timer = ecore_timer_add(0.05, __group_timer_callback, NULL);
+ Evas_Object * layout = __t__get_moments_status_layout();
+ TEST_ASSERT_TRUE(layout != NULL);
+ TEST_ASSERT_TRUE(evas_object_visible_get(layout) == false);
+
+ main_s * info = main_get_info();
+ TEST_ASSERT_TRUE(info != NULL);
+ TEST_ASSERT_TRUE(info->layout != NULL);
+
+ __t__layout_mouse_down(info->layout, 180, 50);
+ __t__layout_mouse_move(info->layout, 180, 300);
+ __t__layout_mouse_up(info->layout, 180, 300);
+ TEST_ASSERT_TRUE(moments_get_visible());
+
+ TEST_CASE_CONTINUE(0.6, __continue_touch_down_bottom, NULL);
}
-static Eina_Bool __group_timer_callback(void * data)
+static unit_case_func_t __continue_touch_down_bottom(void *data)
{
- if (s_info.case_pool[s_info.current_case] == NULL) {
- s_info.group->finish(s_info.group);
+ Evas_Object * layout = __t__get_moments_view_layout();
+ TEST_ASSERT_TRUE(layout != NULL);
+ TEST_ASSERT_TRUE(moments_get_visible());
- s_info.group_timer = NULL;
- return ECORE_CALLBACK_CANCEL;
- }
+ __t__background_layout_mouse_down(WINDOW_W / 2, WINDOW_H - DRAW_INC);
+ __t__background_layout_mouse_move(WINDOW_W / 2, WINDOW_H - DRAW_INC - (MOMENT_DRAW_LIMIT + 1));
+
+ TEST_ASSERT_TRUE(moments_get_visible());
+
+ TEST_CASE_CONTINUE(0.1, __continue_check_content_alpha, (void*)10);
+}
+
+void group_feature_moments_vi(unit_group_t * group)
+{
+ s_info.group = group;
+ s_info.group->set_up = __set_up;
+ s_info.group->tear_down = __tear_down;
+
+ TEST_GROUP_SET_UP(s_info.group, __group_set_up);
- TEST_CASE(s_info.group, s_info.case_pool[s_info.current_case]);
- s_info.current_case += 1;
+ TEST_CASE_ADD(s_info.group, __case_drag_down, NULL);
+ TEST_CASE_ADD(s_info.group, __case_drag_up, NULL);
- return ECORE_CALLBACK_RENEW;
+ TEST_GROUP_RUN(s_info.group);
}
#endif
#include <Elementary.h>
#include <app.h>
-
-static void __case_touch_down_top(bool * is_passed);
-static void __case_touch_up(bool * is_passed);
-static void __case_check_status_layout_state_show(bool * is_passed);
-static void __case_check_icon_state_show(bool * is_passed);
-
static struct {
- int current_step;
- Ecore_Timer * group_timer;
unit_group_t * group;
- int current_case;
- void(*case_pool[TEST_CASE_MAX + 1])(bool * is_passed);
} s_info = {
- .current_step = 0,
- .group_timer = NULL,
.group = NULL,
- .current_case = 0,
- .case_pool = {
- __case_touch_down_top,
- __case_check_status_layout_state_show,
- __case_check_icon_state_show,
- __case_touch_up,
- NULL,
- },
};
-static Eina_Bool __group_timer_callback(void * data);
-
-static void __set_up(void) {}
-
-static void __tear_down(void) {}
-
-const int touch_x[10] = { 180, 101, 259, 180, 180, 0 };
-const int touch_y[10] = { 50, 50, 50, 89, 0, 0 };
-
-
-static void __case_touch_down_top(bool * is_passed)
+static void __group_set_up(void)
{
- main_s * info = main_get_info();
- TEST_ASSERT_TRUE(info != NULL);
- TEST_ASSERT_TRUE(info->layout != NULL);
-
- TEST_ASSERT_TRUE(moments_get_visible() == false);
+ if (moments_get_visible()) {
+ moments_hide();
- __t__layout_mouse_down(info->layout, touch_x[s_info.current_step], touch_y[s_info.current_step]);
-
- TEST_ASSERT_TRUE(moments_get_visible());
-
- Evas_Object * layout = __t__get_moments_status_layout();
-
- TEST_ASSERT_TRUE(layout != NULL);
- TEST_ASSERT_TRUE(evas_object_visible_get(layout) == EINA_TRUE);
+ TEST_GROUP_SET_UP_DONE(0.6, s_info.group);
+ }
- *is_passed = true;
+ TEST_GROUP_SET_UP_DONE(0.0, s_info.group);
}
-static void __case_touch_up(bool * is_passed)
+static void __group_tear_down(void)
{
- main_s * info = main_get_info();
- TEST_ASSERT_TRUE(info != NULL);
- TEST_ASSERT_TRUE(info->layout != NULL);
+ if (moments_get_visible()) {
+ moments_hide();
- TEST_ASSERT_TRUE(moments_get_visible());
-
- __t__layout_mouse_up(info->layout, touch_x[s_info.current_step], touch_y[s_info.current_step]);
+ TEST_GROUP_TEAR_DOWN_DONE(0.6, s_info.group);
+ }
- TEST_ASSERT_TRUE(moments_get_visible() == false);
+ TEST_GROUP_TEAR_DOWN_DONE(0.0, s_info.group);
+}
- s_info.current_step += 1;
+static void __set_up(void)
+{
+ s_info.group->set_up_complete(s_info.group);
+}
- *is_passed = true;
+static void __tear_down(void)
+{
+ s_info.group->tear_down_complete(s_info.group);
}
-static void __case_check_status_layout_state_show(bool * is_passed)
+static unit_case_func_t __case_check_status_layout(void * data)
{
+ int state = (int)data;
+ int is_show = (state % 2);
+ int expected_x = is_show ? 0 : OUTSIDE_X;
+ int expected_y = is_show ? 0 : OUTSIDE_Y;
+
+ TEST_ASSERT_TRUE(moments_get_visible() == is_show);
+
Evas_Object * layout = __t__get_moments_status_layout();
TEST_ASSERT_TRUE(layout != NULL);
- TEST_ASSERT_TRUE(evas_object_visible_get(layout) == EINA_TRUE);
+ TEST_ASSERT_TRUE(evas_object_visible_get(layout) == is_show);
int x = 0, y = 0, w = 0, h = 0;
evas_object_geometry_get(layout, &x, &y, &w, &h);
- TEST_ASSERT_EQUAL_INT(0, x);
- TEST_ASSERT_EQUAL_INT(0, y);
+ TEST_ASSERT_EQUAL_INT(expected_x, x);
+ TEST_ASSERT_EQUAL_INT(expected_y, y);
TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
TEST_ASSERT_EQUAL_INT(MOMENTS_INIT_H, h);
- *is_passed = true;
-}
-
-static void __case_check_icon_state_show(bool * is_passed)
-{
- Evas_Object * layout = __t__get_moments_status_layout();
+ main_s * info = main_get_info();
+ TEST_ASSERT_TRUE(info != NULL);
+ TEST_ASSERT_TRUE(info->layout != NULL);
- TEST_ASSERT_TRUE(layout != NULL);
- TEST_ASSERT_TRUE(evas_object_visible_get(layout) == EINA_TRUE);
+ if (state == 0) {
+ __t__layout_mouse_down(info->layout, 180, 50);
+ TEST_ASSERT_TRUE(moments_get_visible());
+ TEST_CASE_CONTINUE(0.6, __case_check_status_layout, (void*)1);
+ } else if (state == 1) {
+ __t__layout_mouse_up(info->layout, 180, 50);
+ TEST_ASSERT_TRUE(moments_get_visible() == false);
+ TEST_CASE_CONTINUE(0.6, __case_check_status_layout, (void*)2);
+ }
- *is_passed = true;
+ TEST_CASE_DONE(s_info.group);
}
void group_feature_status_area_layer_show(unit_group_t * group)
{
- if (s_info.group_timer) {
- ecore_timer_del(s_info.group_timer);
- s_info.group_timer = NULL;
- }
-
- s_info.current_step = 0;
- s_info.current_case = 0;
s_info.group = group;
- s_info.group_timer = ecore_timer_add(0.6, __group_timer_callback, NULL);
-}
+ s_info.group->set_up = __set_up;
+ s_info.group->tear_down = __tear_down;
-static Eina_Bool __group_timer_callback(void * data)
-{
- if (s_info.case_pool[s_info.current_case] == NULL) {
- s_info.group->finish(s_info.group);
-
- s_info.group_timer = NULL;
- return ECORE_CALLBACK_CANCEL;
- }
+ TEST_GROUP_SET_UP(s_info.group, __group_set_up);
+ TEST_GROUP_TEAR_DOWN(s_info.group, __group_tear_down);
- TEST_CASE(s_info.group, s_info.case_pool[s_info.current_case]);
- s_info.current_case += 1;
+ TEST_CASE_ADD(s_info.group, __case_check_status_layout, (void*)0);
- return ECORE_CALLBACK_RENEW;
+ TEST_GROUP_RUN(s_info.group);
}
#endif
static unit_case_func_t __case_check_battery_percent_round_off(void * data)
{
int real_percent = 2;
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, __t__get_round_off_percent(real_percent));
+ TEST_ASSERT_EQUAL_INT(0, __t__get_round_off_percent(real_percent));
real_percent = 4;
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, __t__get_round_off_percent(real_percent));
+ TEST_ASSERT_EQUAL_INT(0, __t__get_round_off_percent(real_percent));
real_percent = 6;
- TEST_ASSERT_EQUAL_INT_UPGRADE(5, __t__get_round_off_percent(real_percent));
+ TEST_ASSERT_EQUAL_INT(5, __t__get_round_off_percent(real_percent));
real_percent = 8;
- TEST_ASSERT_EQUAL_INT_UPGRADE(10, __t__get_round_off_percent(real_percent));
+ TEST_ASSERT_EQUAL_INT(10, __t__get_round_off_percent(real_percent));
real_percent = 21;
- TEST_ASSERT_EQUAL_INT_UPGRADE(20, __t__get_round_off_percent(real_percent));
+ TEST_ASSERT_EQUAL_INT(20, __t__get_round_off_percent(real_percent));
real_percent = 33;
- TEST_ASSERT_EQUAL_INT_UPGRADE(35, __t__get_round_off_percent(real_percent));
+ TEST_ASSERT_EQUAL_INT(35, __t__get_round_off_percent(real_percent));
real_percent = 49;
- TEST_ASSERT_EQUAL_INT_UPGRADE(50, __t__get_round_off_percent(real_percent));
+ TEST_ASSERT_EQUAL_INT(50, __t__get_round_off_percent(real_percent));
real_percent = 82;
- TEST_ASSERT_EQUAL_INT_UPGRADE(80, __t__get_round_off_percent(real_percent));
+ TEST_ASSERT_EQUAL_INT(80, __t__get_round_off_percent(real_percent));
real_percent = 88;
- TEST_ASSERT_EQUAL_INT_UPGRADE(90, __t__get_round_off_percent(real_percent));
+ TEST_ASSERT_EQUAL_INT(90, __t__get_round_off_percent(real_percent));
real_percent = 97;
- TEST_ASSERT_EQUAL_INT_UPGRADE(95, __t__get_round_off_percent(real_percent));
+ TEST_ASSERT_EQUAL_INT(95, __t__get_round_off_percent(real_percent));
real_percent = 100;
- TEST_ASSERT_EQUAL_INT_UPGRADE(100, __t__get_round_off_percent(real_percent));
+ TEST_ASSERT_EQUAL_INT(100, __t__get_round_off_percent(real_percent));
real_percent = 120;
- TEST_ASSERT_EQUAL_INT_UPGRADE(100, __t__get_round_off_percent(real_percent));
+ TEST_ASSERT_EQUAL_INT(100, __t__get_round_off_percent(real_percent));
real_percent = 200;
- TEST_ASSERT_EQUAL_INT_UPGRADE(100, __t__get_round_off_percent(real_percent));
+ TEST_ASSERT_EQUAL_INT(100, __t__get_round_off_percent(real_percent));
TEST_CASE_DONE(s_info.group);
}
{
int dest_y = 0;
__t__get_draw_up_view_y(0, 0, &dest_y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, dest_y);
+ TEST_ASSERT_EQUAL_INT(0, dest_y);
dest_y = 0;
__t__get_draw_up_view_y(180, 180, &dest_y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, dest_y);
+ TEST_ASSERT_EQUAL_INT(0, dest_y);
dest_y = 0;
__t__get_draw_up_view_y(100, 90, &dest_y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, dest_y);
+ TEST_ASSERT_EQUAL_INT(0, dest_y);
dest_y = 0;
__t__get_draw_up_view_y(100, 89, &dest_y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(-1, dest_y);
+ TEST_ASSERT_EQUAL_INT(-1, dest_y);
dest_y = 0;
__t__get_draw_up_view_y(100, 10, &dest_y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(-80, dest_y);
+ TEST_ASSERT_EQUAL_INT(-80, dest_y);
dest_y = 0;
__t__get_draw_up_view_y(100, 130, &dest_y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, dest_y);
+ TEST_ASSERT_EQUAL_INT(0, dest_y);
int start_y = -WINDOW_H + MOMENTS_INIT_H;
dest_y = OUTSIDE_Y;
__t__get_draw_down_view_y(100, 100, &dest_y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y, dest_y);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, dest_y);
dest_y = OUTSIDE_Y;
__t__get_draw_down_view_y(100, 30, &dest_y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y, dest_y);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, dest_y);
dest_y = OUTSIDE_Y;
__t__get_draw_down_view_y(200, 300, &dest_y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y, dest_y);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, dest_y);
dest_y = OUTSIDE_Y;
__t__get_draw_down_view_y(100, 111, &dest_y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y, dest_y);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, dest_y);
dest_y = OUTSIDE_Y;
__t__get_draw_down_view_y(100, MOMENTS_INIT_H, &dest_y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y, dest_y);
+ TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, dest_y);
dest_y = OUTSIDE_Y;
__t__get_draw_down_view_y(100, MOMENTS_INIT_H + 1, &dest_y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(start_y + 1, dest_y);
+ TEST_ASSERT_EQUAL_INT(start_y + 1, dest_y);
dest_y = OUTSIDE_Y;
__t__get_draw_down_view_y(50, MOMENTS_INIT_H + 100, &dest_y);
- TEST_ASSERT_EQUAL_INT_UPGRADE(start_y + 100, dest_y);
+ TEST_ASSERT_EQUAL_INT(start_y + 100, dest_y);
TEST_CASE_DONE(s_info.group);
}
static unit_case_func_t __case_control_layout_alpha(void * data)
{
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, __t__get_control_layout_alpha(MOMENTS_INIT_H));
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, __t__get_control_layout_alpha((MOMENTS_INIT_H + MOMENT_BUTTON_VI_START_Y) / 2));
- TEST_ASSERT_EQUAL_INT_UPGRADE(125, __t__get_control_layout_alpha(MOMENT_BUTTON_VI_START_Y));
- TEST_ASSERT_EQUAL_INT_UPGRADE(190, __t__get_control_layout_alpha((MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) / 2.0));
- TEST_ASSERT_EQUAL_INT_UPGRADE(156, __t__get_control_layout_alpha(MOMENT_BUTTON_VI_START_Y + ((MOMENT_BUTTON_VI_END_Y - MOMENT_BUTTON_VI_START_Y) / 4.0)));
- TEST_ASSERT_EQUAL_INT_UPGRADE(221, __t__get_control_layout_alpha(MOMENT_BUTTON_VI_START_Y + ((MOMENT_BUTTON_VI_END_Y - MOMENT_BUTTON_VI_START_Y) * 3.0 / 4.0)));
- TEST_ASSERT_EQUAL_INT_UPGRADE(255, __t__get_control_layout_alpha(MOMENT_BUTTON_VI_END_Y));
+ TEST_ASSERT_EQUAL_INT(0, __t__get_control_layout_alpha(MOMENTS_INIT_H));
+ TEST_ASSERT_EQUAL_INT(0, __t__get_control_layout_alpha((MOMENTS_INIT_H + MOMENT_BUTTON_VI_START_Y) / 2));
+ TEST_ASSERT_EQUAL_INT(125, __t__get_control_layout_alpha(MOMENT_BUTTON_VI_START_Y));
+ TEST_ASSERT_EQUAL_INT(190, __t__get_control_layout_alpha((MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) / 2.0));
+ TEST_ASSERT_EQUAL_INT(156, __t__get_control_layout_alpha(MOMENT_BUTTON_VI_START_Y + ((MOMENT_BUTTON_VI_END_Y - MOMENT_BUTTON_VI_START_Y) / 4.0)));
+ TEST_ASSERT_EQUAL_INT(221, __t__get_control_layout_alpha(MOMENT_BUTTON_VI_START_Y + ((MOMENT_BUTTON_VI_END_Y - MOMENT_BUTTON_VI_START_Y) * 3.0 / 4.0)));
+ TEST_ASSERT_EQUAL_INT(255, __t__get_control_layout_alpha(MOMENT_BUTTON_VI_END_Y));
TEST_CASE_DONE(s_info.group);
}
Evas_Object * base_layout = win_create("TEST");
control_info_t *button = moments_control_create_button(base_layout, button_id);
- TEST_ASSERT_TRUE_UPGRADE(button != NULL);
+ TEST_ASSERT_TRUE(button != NULL);
- TEST_ASSERT_EQUAL_INT_UPGRADE(control_button_list[button_id].btn_type, button->btn_type);
+ TEST_ASSERT_EQUAL_INT(control_button_list[button_id].btn_type, button->btn_type);
- TEST_ASSERT_TRUE_UPGRADE(control_button_list[button_id].label != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(control_button_list[button_id].label, button->label);
+ TEST_ASSERT_TRUE(control_button_list[button_id].label != NULL);
+ TEST_ASSERT_EQUAL_STRING(control_button_list[button_id].label, button->label);
- TEST_ASSERT_TRUE_UPGRADE(control_button_list[button_id].icon_image != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(control_button_list[button_id].icon_image, button->icon_image);
+ TEST_ASSERT_TRUE(control_button_list[button_id].icon_image != NULL);
+ TEST_ASSERT_EQUAL_STRING(control_button_list[button_id].icon_image, button->icon_image);
- TEST_ASSERT_TRUE_UPGRADE(control_button_list[button_id].volume_text != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(control_button_list[button_id].volume_text, button->volume_text);
+ TEST_ASSERT_TRUE(control_button_list[button_id].volume_text != NULL);
+ TEST_ASSERT_EQUAL_STRING(control_button_list[button_id].volume_text, button->volume_text);
- TEST_ASSERT_EQUAL_INT_UPGRADE(control_button_list[button_id].icon_status, button->icon_status);
- TEST_ASSERT_EQUAL_INT_UPGRADE(control_button_list[button_id].more_opt_status, button->more_opt_status);
- TEST_ASSERT_EQUAL_INT_UPGRADE(control_button_list[button_id].index, button->index);
+ TEST_ASSERT_EQUAL_INT(control_button_list[button_id].icon_status, button->icon_status);
+ TEST_ASSERT_EQUAL_INT(control_button_list[button_id].more_opt_status, button->more_opt_status);
+ TEST_ASSERT_EQUAL_INT(control_button_list[button_id].index, button->index);
- TEST_ASSERT_TRUE_UPGRADE(control_button_list[button_id].pressed == button->pressed);
+ TEST_ASSERT_TRUE(control_button_list[button_id].pressed == button->pressed);
- TEST_ASSERT_TRUE_UPGRADE(button->button_layout != NULL);
+ TEST_ASSERT_TRUE(button->button_layout != NULL);
Evas_Object * icon = elm_object_part_content_get(button->button_layout, CONTROLS_ICON);
- TEST_ASSERT_TRUE_UPGRADE(icon != NULL);
+ TEST_ASSERT_TRUE(icon != NULL);
const char *image_path = NULL;
elm_image_file_get(icon, &image_path, NULL);
- TEST_ASSERT_TRUE_UPGRADE(image_path != NULL);
+ TEST_ASSERT_TRUE(image_path != NULL);
char expected_path[MAX_FILE_PATH_LEN] = {0};
snprintf(expected_path, MAX_FILE_PATH_LEN, "%simages/%s", app_get_resource_path(), control_button_list[button_id].icon_image);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(expected_path, image_path);
+ TEST_ASSERT_EQUAL_STRING(expected_path, image_path);
Evas_Object * text = NULL;
Evas_Object * bar = NULL;
switch (button->btn_type) {
case MOMENTS_CONTROLS_BTN_TYPE_ICON_AND_TEXT:
text = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(button->button_layout), CONTROLS_TEXT);
- TEST_ASSERT_TRUE_UPGRADE(text != NULL);
+ TEST_ASSERT_TRUE(text != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(control_button_list[button_id].volume_text, elm_object_part_text_get(button->button_layout, CONTROLS_TEXT));
+ TEST_ASSERT_EQUAL_STRING(control_button_list[button_id].volume_text, elm_object_part_text_get(button->button_layout, CONTROLS_TEXT));
break;
case MOMENTS_CONTROLS_BTN_TYPE_ICON_AND_BAR:
bar = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(button->button_layout), CONTROLS_BAR);
- TEST_ASSERT_TRUE_UPGRADE(bar != NULL);
+ TEST_ASSERT_TRUE(bar != NULL);
break;
default :
for (button_index = 0; button_index < total_count; button_index++) {
position_t *pos = moments_control_get_button_position(total_count, button_index);
- TEST_ASSERT_EQUAL_INT_UPGRADE(icon_position[total_count][button_index].x, pos->x);
- TEST_ASSERT_EQUAL_INT_UPGRADE(icon_position[total_count][button_index].y, pos->y);
+ TEST_ASSERT_EQUAL_INT(icon_position[total_count][button_index].x, pos->x);
+ TEST_ASSERT_EQUAL_INT(icon_position[total_count][button_index].y, pos->y);
}
TEST_CASE_DONE(s_info.group);
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#ifndef __TEST_FUNCTION_H__
#define __TEST_FUNCTION_H__
#if TEST_MODE
#include <Elementary.h>
-#include <app.h>
+#include <tizen.h>
#include <Evas.h>
extern Evas_Object * __t__get_moments_view_layout(void);
extern void __t__set_brightness_level(int level);
extern int __t__get_brightness_level(void);
#endif
+
#endif
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "../inc/test.h"
#if (TEST_MODE == TEST_APP)
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#ifndef __TEST_UNIT_H__
#define __TEST_UNIT_H__
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#ifndef __TEST_UNIT_ASSERT_H__
#define __TEST_UNIT_ASSERT_H__
#include "../../../inc/test.h"
#if TEST_MODE
-#include <app.h>
+#include <tizen.h>
#define TEST_ASSERT_TRUE(value) { \
bool __ret = unit_assert_true((value), (__FUNCTION__), (__LINE__)); \
- if (!__ret) { \
- return; \
- } \
- }
-#define TEST_ASSERT_EQUAL_INT(expected_value, input_value) { \
- bool __ret = unit_assert_equal_int((expected_value), (input_value), (__FUNCTION__), (__LINE__)); \
- if (!__ret) { \
- return; \
- } \
- }
-#define TEST_ASSERT_EQUAL_DOUBLE(expected_value, input_value) { \
- bool __ret = unit_assert_equal_double((expected_value), (input_value), (__FUNCTION__), (__LINE__)); \
- if (!__ret) { \
- return; \
- } \
- }
-#define TEST_ASSERT_EQUAL_STRING(expected_value, input_value) { \
- bool __ret = unit_assert_equal_string((expected_value), (input_value), (__FUNCTION__), (__LINE__)); \
- if (!__ret) { \
- return; \
- } \
- }
-#define TEST_ASSERT_EQUAL_OBJECT(expected_value, input_value, compare_func) { \
- bool __ret = unit_assert_equal_object((expected_value), (input_value), (compare_func), (__FUNCTION__), (__LINE__)); \
- if (!__ret) { \
- return; \
- } \
- }
-#define TEST_ASSERT_EQUAL_LOG(input_value) { \
- bool __ret = unit_equal_log((input_value), (__FUNCTION__), (__LINE__)); \
- if (!__ret) { \
- return; \
- } \
- }
-#define TEST_ASSERT_TRUE_UPGRADE(value) { \
- bool __ret = unit_assert_true_upgrade((value), (__FUNCTION__), (__LINE__)); \
if (!__ret) { \
TEST_CASE_FAIL(); \
return EINA_FALSE; \
} \
}
-#define TEST_ASSERT_EQUAL_INT_UPGRADE(expected_value, input_value) { \
- bool __ret = unit_assert_equal_int_upgrade((expected_value), (input_value), (__FUNCTION__), (__LINE__)); \
+#define TEST_ASSERT_EQUAL_INT(expected_value, input_value) { \
+ bool __ret = unit_assert_equal_int((expected_value), (input_value), (__FUNCTION__), (__LINE__)); \
if (!__ret) { \
TEST_CASE_FAIL(); \
return EINA_FALSE; \
} \
}
-#define TEST_ASSERT_EQUAL_DOUBLE_UPGRADE(expected_value, input_value) { \
- bool __ret = unit_assert_equal_double_upgrade((expected_value), (input_value), (__FUNCTION__), (__LINE__)); \
+#define TEST_ASSERT_EQUAL_DOUBLE(expected_value, input_value) { \
+ bool __ret = unit_assert_equal_double((expected_value), (input_value), (__FUNCTION__), (__LINE__)); \
if (!__ret) { \
TEST_CASE_FAIL(); \
return EINA_FALSE; \
} \
}
-#define TEST_ASSERT_EQUAL_STRING_UPGRADE(expected_value, input_value) { \
- bool __ret = unit_assert_equal_string_upgrade((expected_value), (input_value), (__FUNCTION__), (__LINE__)); \
+#define TEST_ASSERT_EQUAL_STRING(expected_value, input_value) { \
+ bool __ret = unit_assert_equal_string((expected_value), (input_value), (__FUNCTION__), (__LINE__)); \
if (!__ret) { \
TEST_CASE_FAIL(); \
return EINA_FALSE; \
} \
}
-#define TEST_ASSERT_EQUAL_OBJECT_UPGRADE(expected_value, input_value, compare_func) { \
- bool __ret = unit_assert_equal_object_upgrade((expected_value), (input_value), (compare_func), (__FUNCTION__), (__LINE__)); \
+#define TEST_ASSERT_EQUAL_OBJECT(expected_value, input_value, compare_func) { \
+ bool __ret = unit_assert_equal_object((expected_value), (input_value), (compare_func), (__FUNCTION__), (__LINE__)); \
if (!__ret) { \
TEST_CASE_FAIL(); \
return EINA_FALSE; \
} \
}
-#define TEST_ASSERT_EQUAL_LOG_UPGRADE(input_value) { \
- bool __ret = unit_equal_log_upgrade((input_value), (__FUNCTION__), (__LINE__)); \
+#define TEST_ASSERT_EQUAL_LOG(input_value) { \
+ bool __ret = unit_equal_log((input_value), (__FUNCTION__), (__LINE__)); \
if (!__ret) { \
TEST_CASE_FAIL(); \
return EINA_FALSE; \
bool unit_assert_equal_object(const void * expected_value, const void * input_value,
bool(*compare_func)(const void * object1, const void * object2),
const char * func, const int line);
-bool unit_assert_true_upgrade(const int value, const char * func, const int line);
-bool unit_assert_equal_int_upgrade(const int expected_value, const int input_value, const char * func, const int line);
-bool unit_assert_equal_double_upgrade(const double expected_value, const double input_value, const char * func, const int line);
-bool unit_assert_equal_string_upgrade(const char * expected_value, const char * input_value, const char * func, const int line);
-bool unit_assert_equal_object_upgrade(const void * expected_value, const void * input_value,
- bool(*compare_func)(const void * object1, const void * object2),
- const char * func, const int line);
#endif
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#ifndef __TEST_UNIT_GROUP_H__
#define __TEST_UNIT_GROUP_H__
#include "unit_result.h"
#include <Elementary.h>
-#include <app.h>
#define TEST_CASE_MAX 100
#define GROUP_COUNT_MAX 200
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#ifndef __TEST_UNIT_LOG_BUF_H__
#define __TEST_UNIT_LOG_BUF_H__
#include "../../../inc/test.h"
#if TEST_MODE
-#include <app.h>
+#include <tizen.h>
void unit_write_log(char *fmt, ...);
void unit_clear_log(void);
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#ifndef __TEST_RESULT_H__
#define __TEST_RESULT_H__
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "../../inc/test.h"
#if TEST_MODE
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "../../inc/test.h"
#if TEST_MODE
#include <math.h>
bool unit_assert_true(const int value, const char * func, const int line)
-{
- if (value == 0) {
- __T("%s (%d) FAIL", func, line);
- return false;
- }
-
- return true;
-}
-
-bool unit_assert_equal_int(const int expected_value, const int input_value, const char * func, const int line)
-{
- if (expected_value != input_value) {
- __T("%s (%d) FAIL, Expected %d was %d", func, line, expected_value, input_value);
- return false;
- }
-
- return true;
-}
-
-bool unit_assert_equal_double(const double expected_value, const double input_value, const char * func, const int line)
-{
- if (fabs(expected_value - input_value) >= 1e-10) {
- __T("%s (%d) FAIL, Expected %.10lf was %.10lf", func, line, expected_value, input_value);
- return false;
- }
-
- return true;
-}
-
-bool unit_assert_equal_string(const char * expected_value, const char * input_value, const char * func, const int line)
-{
- if (strcmp(expected_value, input_value)) {
- __T("%s (%d) FAIL, Expected %s was %s", func, line, expected_value, input_value);
- return false;
- }
-
- return true;
-}
-
-bool unit_assert_equal_object(const void * expected_value, const void * input_value,
- bool(*compare_func)(const void * object1, const void * object2),
- const char * func, const int line)
-{
- if (!compare_func(expected_value, input_value)) {
- __T("%s (%d) FAIL, Objects are not equal", func, line);
- return false;
- }
-
- return true;
-}
-
-bool unit_assert_true_upgrade(const int value, const char * func, const int line)
{
if (value == 0) {
unit_group_t * group = unit_get_current_group();
return true;
}
-bool unit_assert_equal_int_upgrade(const int expected_value, const int input_value, const char * func, const int line)
+bool unit_assert_equal_int(const int expected_value, const int input_value, const char * func, const int line)
{
if (expected_value != input_value) {
unit_group_t * group = unit_get_current_group();
return true;
}
-bool unit_assert_equal_double_upgrade(const double expected_value, const double input_value, const char * func, const int line)
+bool unit_assert_equal_double(const double expected_value, const double input_value, const char * func, const int line)
{
if (fabs(expected_value - input_value) >= 1e-10) {
unit_group_t * group = unit_get_current_group();
return true;
}
-bool unit_assert_equal_string_upgrade(const char * expected_value, const char * input_value, const char * func, const int line)
+bool unit_assert_equal_string(const char * expected_value, const char * input_value, const char * func, const int line)
{
if (strcmp(expected_value, input_value)) {
unit_group_t * group = unit_get_current_group();
return true;
}
-bool unit_assert_equal_object_upgrade(const void * expected_value, const void * input_value,
+bool unit_assert_equal_object(const void * expected_value, const void * input_value,
bool(*compare_func)(const void * object1, const void * object2),
const char * func, const int line)
{
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "../../inc/test.h"
#if TEST_MODE
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "../../inc/test.h"
#if TEST_MODE
}
bool unit_equal_log(const char * input_value, const char * func, const int line)
-{
- if (strcmp(s_info.log_buf, input_value)) {
- __T("%s (%d) FAIL, Expected %s was %s", func, line, input_value, s_info.log_buf);
- return false;
- }
-
- return true;
-}
-
-bool unit_equal_log_upgrade(const char * input_value, const char * func, const int line)
{
if (strcmp(s_info.log_buf, input_value)) {
unit_group_t * group = unit_get_current_group();
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "../../inc/test.h"
#if TEST_MODE
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "../../../../inc/test.h"
#if (TEST_MODE == TEST_UNIT)
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#ifndef __TEST_TEST_LOG_H__
#define __TEST_TEST_LOG_H__
#include "../../../../inc/app_log.h"
#include "../../inc/unit.h"
-#include <app.h>
#include <string.h>
void unit_test_log_append_unit_init(char * buf);
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "../../../../inc/test.h"
#if (TEST_MODE == TEST_UNIT)
#include "unit_test_assert.h"
-#include <app.h>
+#include <tizen.h>
#include <math.h>
#include <stdlib.h>
#include <memory.h>
static Eina_Bool __unit_test_assert_bool_ok(void)
{
- TEST_ASSERT_TRUE_UPGRADE(1);
- TEST_ASSERT_TRUE_UPGRADE(-1);
- TEST_ASSERT_TRUE_UPGRADE(987654321);
+ TEST_ASSERT_TRUE(1);
+ TEST_ASSERT_TRUE(-1);
+ TEST_ASSERT_TRUE(987654321);
return EINA_TRUE;
}
static Eina_Bool __unit_test_assert_bool_fail(void)
{
- TEST_ASSERT_TRUE_UPGRADE(0);
+ TEST_ASSERT_TRUE(0);
return EINA_TRUE;
}
static Eina_Bool __unit_test_assert_int_ok(void)
{
- TEST_ASSERT_EQUAL_INT_UPGRADE(1, 1);
- TEST_ASSERT_EQUAL_INT_UPGRADE(-1, -1);
- TEST_ASSERT_EQUAL_INT_UPGRADE(987654321, 987654321);
+ TEST_ASSERT_EQUAL_INT(1, 1);
+ TEST_ASSERT_EQUAL_INT(-1, -1);
+ TEST_ASSERT_EQUAL_INT(987654321, 987654321);
return EINA_TRUE;
}
static Eina_Bool __unit_test_assert_int_fail(void)
{
- TEST_ASSERT_EQUAL_INT_UPGRADE(100, 100);
- TEST_ASSERT_EQUAL_INT_UPGRADE(1, 2);
- TEST_ASSERT_EQUAL_INT_UPGRADE(-1, -1);
+ TEST_ASSERT_EQUAL_INT(100, 100);
+ TEST_ASSERT_EQUAL_INT(1, 2);
+ TEST_ASSERT_EQUAL_INT(-1, -1);
return EINA_TRUE;
}
static Eina_Bool __unit_test_assert_double_ok(void)
{
- TEST_ASSERT_EQUAL_DOUBLE_UPGRADE(1.0, 1.0);
- TEST_ASSERT_EQUAL_DOUBLE_UPGRADE(0.1, 0.1);
- TEST_ASSERT_EQUAL_DOUBLE_UPGRADE(0.000001, 0.000001);
- TEST_ASSERT_EQUAL_DOUBLE_UPGRADE(0.00000000001, 0.00000000002);
+ TEST_ASSERT_EQUAL_DOUBLE(1.0, 1.0);
+ TEST_ASSERT_EQUAL_DOUBLE(0.1, 0.1);
+ TEST_ASSERT_EQUAL_DOUBLE(0.000001, 0.000001);
+ TEST_ASSERT_EQUAL_DOUBLE(0.00000000001, 0.00000000002);
return EINA_TRUE;
}
static Eina_Bool __unit_test_assert_double_fail(void)
{
- TEST_ASSERT_EQUAL_DOUBLE_UPGRADE(0.00000000001, 0.00000000002);
- TEST_ASSERT_EQUAL_DOUBLE_UPGRADE(0.0000000001, 0.0000000002);
+ TEST_ASSERT_EQUAL_DOUBLE(0.00000000001, 0.00000000002);
+ TEST_ASSERT_EQUAL_DOUBLE(0.0000000001, 0.0000000002);
return EINA_TRUE;
}
static Eina_Bool __unit_test_assert_string_ok(void)
{
- TEST_ASSERT_EQUAL_STRING_UPGRADE("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
- TEST_ASSERT_EQUAL_STRING_UPGRADE("abcdefg", "abcdefg");
+ TEST_ASSERT_EQUAL_STRING("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
+ TEST_ASSERT_EQUAL_STRING("abcdefg", "abcdefg");
char str1[] = "abcdefghijklmnopqrstuvwxyz";
char str2[] = "abcdefghijklmnopqrstuvwxyz";
- TEST_ASSERT_EQUAL_STRING_UPGRADE(str1, str2);
- TEST_ASSERT_EQUAL_STRING_UPGRADE(str1 + 5, str2 + 5);
+ TEST_ASSERT_EQUAL_STRING(str1, str2);
+ TEST_ASSERT_EQUAL_STRING(str1 + 5, str2 + 5);
char str3[] = "abcdefghijklmnopqrstuvwxyz";
char str4[] = "aabcdefghijklmnopqrstuvwxyz";
- TEST_ASSERT_EQUAL_STRING_UPGRADE(str3, str4+1);
+ TEST_ASSERT_EQUAL_STRING(str3, str4+1);
return EINA_TRUE;
}
static Eina_Bool __unit_test_assert_string_fail(void)
{
- TEST_ASSERT_EQUAL_STRING_UPGRADE("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
+ TEST_ASSERT_EQUAL_STRING("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
char str1[] = "abcdefghijklmnopqrstuvwxyz";
char str2[] = "abcdefghijklmnopqrstuvwxyz";
- TEST_ASSERT_EQUAL_STRING_UPGRADE(str1, str2 + 1);
+ TEST_ASSERT_EQUAL_STRING(str1, str2 + 1);
return EINA_TRUE;
}
{
object_t a = { 0, 0, 0, 0, 0 };
object_t b = { 0, 0, 0, 0, 0 };
- TEST_ASSERT_EQUAL_OBJECT_UPGRADE(&a, &b, __object_equal);
+ TEST_ASSERT_EQUAL_OBJECT(&a, &b, __object_equal);
a.a = 1;
b.a = 1;
- TEST_ASSERT_EQUAL_OBJECT_UPGRADE(&a, &b, __object_equal);
+ TEST_ASSERT_EQUAL_OBJECT(&a, &b, __object_equal);
a.b = 0.00000000001;
b.b = 0.00000000002;
- TEST_ASSERT_EQUAL_OBJECT_UPGRADE(&a, &b, __object_equal);
+ TEST_ASSERT_EQUAL_OBJECT(&a, &b, __object_equal);
a.func_a = __unit_test_assert_object_ok;
b.func_a = __unit_test_assert_object_ok;
- TEST_ASSERT_EQUAL_OBJECT_UPGRADE(&a, &b, __object_equal);
+ TEST_ASSERT_EQUAL_OBJECT(&a, &b, __object_equal);
object_t * p_a = (object_t *)malloc(sizeof(object_t));
object_t * p_b = (object_t *)malloc(sizeof(object_t));
memset(p_a, 0, sizeof(object_t));
memset(p_b, 0, sizeof(object_t));
- TEST_ASSERT_EQUAL_OBJECT_UPGRADE(p_a, p_b, __object_equal);
+ TEST_ASSERT_EQUAL_OBJECT(p_a, p_b, __object_equal);
p_a->a = 1;
p_b->a = 1;
p_a->b = 0.00000000001;
p_b->func_a = __unit_test_assert_object_ok;
p_a->c = 1;
p_b->c = 1;
- TEST_ASSERT_EQUAL_OBJECT_UPGRADE(p_a, p_b, __object_equal);
+ TEST_ASSERT_EQUAL_OBJECT(p_a, p_b, __object_equal);
free(p_a);
free(p_b);
{
object_t a = { 0, 0, 0, 0, 0 };
object_t b = { 0, 0, 0, 0, 0 };
- TEST_ASSERT_EQUAL_OBJECT_UPGRADE(&a, &b, __object_equal);
+ TEST_ASSERT_EQUAL_OBJECT(&a, &b, __object_equal);
a.a = 1;
b.a = 1;
- TEST_ASSERT_EQUAL_OBJECT_UPGRADE(&a, &b, __object_equal);
+ TEST_ASSERT_EQUAL_OBJECT(&a, &b, __object_equal);
a.b = 0.0000000001;
b.b = 0.0000000002;
- TEST_ASSERT_EQUAL_OBJECT_UPGRADE(&a, &b, __object_equal);
+ TEST_ASSERT_EQUAL_OBJECT(&a, &b, __object_equal);
a.func_a = __unit_test_assert_object_ok;
b.func_a = __unit_test_assert_object_ok;
- TEST_ASSERT_EQUAL_OBJECT_UPGRADE(&a, &b, __object_equal);
+ TEST_ASSERT_EQUAL_OBJECT(&a, &b, __object_equal);
return EINA_TRUE;
}
{
char * buf = __t__get_unit_log_buf();
strcpy(buf, "");
- TEST_ASSERT_EQUAL_LOG_UPGRADE("");
+ TEST_ASSERT_EQUAL_LOG("");
__T("assert");
- TEST_ASSERT_EQUAL_LOG_UPGRADE("assert\n");
+ TEST_ASSERT_EQUAL_LOG("assert\n");
__T("%s", "log");
- TEST_ASSERT_EQUAL_LOG_UPGRADE("assert\nlog\n");
+ TEST_ASSERT_EQUAL_LOG("assert\nlog\n");
__T("%d %.2lf ok", 99, 0.01);
- TEST_ASSERT_EQUAL_LOG_UPGRADE("assert\nlog\n99 0.01 ok\n");
+ TEST_ASSERT_EQUAL_LOG("assert\nlog\n99 0.01 ok\n");
return EINA_TRUE;
}
{
char * buf = __t__get_unit_log_buf();
strcpy(buf, "");
- TEST_ASSERT_EQUAL_LOG_UPGRADE("");
+ TEST_ASSERT_EQUAL_LOG("");
__T("assert");
__T("%s", "log");
__T("%d %.2lf ok", 99, 0.01);
- TEST_ASSERT_EQUAL_LOG_UPGRADE("assert\nlog\n99 0.01 no\n");
+ TEST_ASSERT_EQUAL_LOG("assert\nlog\n99 0.01 no\n");
return EINA_TRUE;
}
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#ifndef __TEST_TEST_UNIT_ASSERT_H__
#define __TEST_TEST_UNIT_ASSERT_H__
#include "../../../../inc/app_log.h"
#include "../../inc/unit.h"
-#include <app.h>
#include <string.h>
#define __unit_test_run_assert(result) { if ((result) == false) __TU("!!!!!ASSERT MACRO TEST FAIL!!!!!"); }
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "../../../../inc/test.h"
#if (TEST_MODE == TEST_UNIT)
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#ifndef __TEST_TEST_UNIT_FUNCTION_H__
#define __TEST_TEST_UNIT_FUNCTION_H__
#include "../../../../inc/app_log.h"
#include "../../inc/unit.h"
-#include <app.h>
#include <string.h>
#define __unit_test_run_function(result) { if ((result) == false) __TU("##########FUNCTION TEST FAIL##########"); }
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "../../../../inc/test.h"
#if (TEST_MODE == TEST_UNIT)
static Eina_Bool __unit_test_group_new(void)
{
unit_group_t * group = unit_group_new("group_1", __group_finish);
- TEST_ASSERT_TRUE_UPGRADE(group != NULL);
- TEST_ASSERT_EQUAL_STRING_UPGRADE("group_1", group->name);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, group->result->ran_case);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, group->result->passed);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, group->result->failed);
- TEST_ASSERT_TRUE_UPGRADE(group->finish != NULL)
+ TEST_ASSERT_TRUE(group != NULL);
+ TEST_ASSERT_EQUAL_STRING("group_1", group->name);
+ TEST_ASSERT_EQUAL_INT(0, group->result->ran_case);
+ TEST_ASSERT_EQUAL_INT(0, group->result->passed);
+ TEST_ASSERT_EQUAL_INT(0, group->result->failed);
+ TEST_ASSERT_TRUE(group->finish != NULL)
unit_group_del(group);
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "../../../../inc/test.h"
#if (TEST_MODE == TEST_UNIT)
{
char * buf = __t__get_unit_log_buf();
strcpy(buf, "");
- TEST_ASSERT_EQUAL_STRING_UPGRADE(buf, "");
+ TEST_ASSERT_EQUAL_STRING(buf, "");
unit_write_log("write");
unit_write_log("log");
- TEST_ASSERT_EQUAL_STRING_UPGRADE(buf, "write\nlog\n");
+ TEST_ASSERT_EQUAL_STRING(buf, "write\nlog\n");
return EINA_TRUE;
}
{
char * buf = __t__get_unit_log_buf();
strcpy(buf, "clear");
- TEST_ASSERT_EQUAL_STRING_UPGRADE(buf, "clear");
+ TEST_ASSERT_EQUAL_STRING(buf, "clear");
unit_clear_log();
- TEST_ASSERT_EQUAL_STRING_UPGRADE(buf, "");
+ TEST_ASSERT_EQUAL_STRING(buf, "");
return EINA_TRUE;
}
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "../../../../inc/test.h"
#if (TEST_MODE == TEST_UNIT)
{
unit_result_t * result = unit_result_new();
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, result->ran_case);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, result->passed);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, result->failed);
+ TEST_ASSERT_EQUAL_INT(0, result->ran_case);
+ TEST_ASSERT_EQUAL_INT(0, result->passed);
+ TEST_ASSERT_EQUAL_INT(0, result->failed);
int i = 0;
for (i = 0; i < 3; i++) unit_result_pass(result);
for (i = 0; i < 3; i++) unit_result_pass(result);
for (i = 0; i < 2; i++) unit_result_fail(result);
- TEST_ASSERT_EQUAL_INT_UPGRADE(15, result->ran_case);
- TEST_ASSERT_EQUAL_INT_UPGRADE(9, result->passed);
- TEST_ASSERT_EQUAL_INT_UPGRADE(6, result->failed);
+ TEST_ASSERT_EQUAL_INT(15, result->ran_case);
+ TEST_ASSERT_EQUAL_INT(9, result->passed);
+ TEST_ASSERT_EQUAL_INT(6, result->failed);
unit_result_t * result2 = unit_result_new();
for (i = 0; i < 9; i++) unit_result_pass(result2);
for (i = 0; i < 8; i++) unit_result_fail(result2);
- TEST_ASSERT_EQUAL_INT_UPGRADE(17, result2->ran_case);
- TEST_ASSERT_EQUAL_INT_UPGRADE(9, result2->passed);
- TEST_ASSERT_EQUAL_INT_UPGRADE(8, result2->failed);
+ TEST_ASSERT_EQUAL_INT(17, result2->ran_case);
+ TEST_ASSERT_EQUAL_INT(9, result2->passed);
+ TEST_ASSERT_EQUAL_INT(8, result2->failed);
unit_result_add(result, result2);
- TEST_ASSERT_EQUAL_INT_UPGRADE(32, result->ran_case);
- TEST_ASSERT_EQUAL_INT_UPGRADE(18, result->passed);
- TEST_ASSERT_EQUAL_INT_UPGRADE(14, result->failed);
+ TEST_ASSERT_EQUAL_INT(32, result->ran_case);
+ TEST_ASSERT_EQUAL_INT(18, result->passed);
+ TEST_ASSERT_EQUAL_INT(14, result->failed);
unit_result_init(result);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, result->ran_case);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, result->passed);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, result->failed);
+ TEST_ASSERT_EQUAL_INT(0, result->ran_case);
+ TEST_ASSERT_EQUAL_INT(0, result->passed);
+ TEST_ASSERT_EQUAL_INT(0, result->failed);
unit_result_del(result2);
unit_result_del(result);
for (i = 0; i < 9; i++) unit_result_pass(result);
for (i = 0; i < 8; i++) unit_result_fail(result);
- TEST_ASSERT_EQUAL_INT_UPGRADE(8, result->failed);
- TEST_ASSERT_EQUAL_INT_UPGRADE(9, result->passed);
- TEST_ASSERT_EQUAL_INT_UPGRADE(17, result->ran_case);
+ TEST_ASSERT_EQUAL_INT(8, result->failed);
+ TEST_ASSERT_EQUAL_INT(9, result->passed);
+ TEST_ASSERT_EQUAL_INT(17, result->ran_case);
unit_init();
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, result->failed);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, result->passed);
- TEST_ASSERT_EQUAL_INT_UPGRADE(0, result->ran_case);
+ TEST_ASSERT_EQUAL_INT(0, result->failed);
+ TEST_ASSERT_EQUAL_INT(0, result->passed);
+ TEST_ASSERT_EQUAL_INT(0, result->ran_case);
char buf[1024] = { 0, };
unit_test_log_append_unit_init(buf);
- TEST_ASSERT_EQUAL_LOG_UPGRADE(buf);
+ TEST_ASSERT_EQUAL_LOG(buf);
return EINA_TRUE;
}
unit_result_t * result = __t__get_unit_result();
for (i = 0; i < 9; i++) unit_result_pass(result);
for (i = 0; i < 8; i++) unit_result_fail(result);
- TEST_ASSERT_EQUAL_INT_UPGRADE(8, result->failed);
- TEST_ASSERT_EQUAL_INT_UPGRADE(9, result->passed);
- TEST_ASSERT_EQUAL_INT_UPGRADE(17, result->ran_case);
+ TEST_ASSERT_EQUAL_INT(8, result->failed);
+ TEST_ASSERT_EQUAL_INT(9, result->passed);
+ TEST_ASSERT_EQUAL_INT(17, result->ran_case);
char buf[1024] = { 0, };
unit_test_log_append_unit_fini(buf, result);
unit_fini();
- TEST_ASSERT_EQUAL_LOG_UPGRADE(buf);
+ TEST_ASSERT_EQUAL_LOG(buf);
unit_clear_log();
unit_fini();
- TEST_ASSERT_EQUAL_LOG_UPGRADE(buf);
+ TEST_ASSERT_EQUAL_LOG(buf);
return EINA_TRUE;
}
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "../../../../inc/test.h"
#if (TEST_MODE == TEST_UNIT)
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#ifndef __TEST_TEST_UNIT_GROUP_H__
#define __TEST_TEST_UNIT_GROUP_H__
#include "../../../../inc/app_log.h"
#include "../../inc/unit.h"
-#include <app.h>
#include <string.h>
void unit_test_group(void);
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "../../../../inc/test.h"
#if (TEST_MODE == TEST_UNIT)
static unit_case_func_t __pass_case(void * data)
{
- TEST_ASSERT_EQUAL_INT_UPGRADE(99, 99);
- TEST_ASSERT_TRUE_UPGRADE(true);
+ TEST_ASSERT_EQUAL_INT(99, 99);
+ TEST_ASSERT_TRUE(true);
__T("pass case : %d", (int)data);
static unit_case_func_t __continue_pass(void * data);
static unit_case_func_t __pass_continue_case(void * data)
{
- TEST_ASSERT_EQUAL_INT_UPGRADE(99, 99);
- TEST_ASSERT_TRUE_UPGRADE(true);
+ TEST_ASSERT_EQUAL_INT(99, 99);
+ TEST_ASSERT_TRUE(true);
__T("pass continue case : %d", (int)data);
static unit_case_func_t __continue_pass(void * data)
{
- TEST_ASSERT_EQUAL_INT_UPGRADE(99, 99);
- TEST_ASSERT_TRUE_UPGRADE(true);
+ TEST_ASSERT_EQUAL_INT(99, 99);
+ TEST_ASSERT_TRUE(true);
__T("continue : %d", (int)data);
TEST_CASE_DONE(s_info.group);
static unit_case_func_t __fail_case(void * data)
{
- TEST_ASSERT_EQUAL_INT_UPGRADE(99, 99);
+ TEST_ASSERT_EQUAL_INT(99, 99);
__T("fail case : %d", (int)data);
- TEST_ASSERT_TRUE_UPGRADE(false);
+ TEST_ASSERT_TRUE(false);
__T("fail case done");
static unit_case_func_t __continue_fail(void * data);
static unit_case_func_t __fail_continue_case(void * data)
{
- TEST_ASSERT_EQUAL_INT_UPGRADE(99, 99);
+ TEST_ASSERT_EQUAL_INT(99, 99);
__T("fail continue case : %d", (int)data);
TEST_CASE_CONTINUE(0.1, __continue_fail, data);
static unit_case_func_t __continue_fail(void * data)
{
- TEST_ASSERT_EQUAL_INT_UPGRADE(99, 99);
+ TEST_ASSERT_EQUAL_INT(99, 99);
__T("continue : %d", (int)data);
- TEST_ASSERT_TRUE_UPGRADE(false);
+ TEST_ASSERT_TRUE(false);
__T("continue done");
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "../../../inc/test.h"
#if (TEST_MODE == TEST_UNIT)