+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="core-watchface-complication-tests" version="0.1.0" api-version="6.0">
- <label>CoreWatchfaceComplicationTest</label>
- <author email="test@tizen.org" href="www.tizen.org">test</author>
- <description>Core API test Application</description>
- <service-application appid="core.watchface-complication-tests" exec="/usr/apps/core-watchface-complication-tests/bin/tct-watchface-complication-core" nodisplay="false" multiple="false" type="capp" taskmanage="true">
- <complication provider-id="org.tizen.watchface-complication-native-utc/test">
- <support-type>
- <short-text-type>
- <default-short-text>10</default-short-text>
- </short-text-type>
- <long-text-type>
- <default-long-text>10</default-long-text>
- </long-text-type>
- <ranged-value-type>
- <default-min>10</default-min>
- <default-max>100</default-max>
- <default-value>30</default-value>
- </ranged-value-type>
- <icon-type>
- <default-icon>iconicon</default-icon>
- </icon-type>
- <image-type>
- <default-image>imageimage</default-image>
- </image-type>
- <time-type>
- <default-hour>10</default-hour>
- <default-minute>20</default-minute>
- <default-second>15</default-second>
- </time-type>
- </support-type>
- <period>60</period>
- <support-event>
- <event>tap</event>
- </support-event>
- <label>MyComp</label>
- <label xml:lang="ar-ae">ﺎﻠﺘﻗﻮﻴﻣ</label>
- <label xml:lang="az-az">Təqvim</label>
- <label xml:lang="bg-bg">Календар</label>
- </complication>
- <metadata key="http://tizen.org/metadata/allowedappid" value="org.tizen.watchface_sample_editor"/>
- <metadata key="http://tizen.org/metadata/allowedappid" value="org.tizen.watchface_sample_provider"/>
- <background-category value="background-network"/>
- <background-category value="download"/>
- <background-category value="iot-communication"/>
- <background-category value="location"/>
- <background-category value="media"/>
- <background-category value="sensor"/>
- </service-application>
- <privileges>
- <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
- <privilege>http://tizen.org/privilege/datasharing</privilege>
- </privileges>
-</manifest>
-
+++ /dev/null
-SET(PKG_NAME "watchface-complication")
-
-SET(EXEC_NAME "tct-${PKG_NAME}-core")
-SET(RPM_NAME "core-${PKG_NAME}-tests")
-
-SET(CAPI_LIB "watchface-complication")
-SET(TC_SOURCES
- utc-watchface-complication.c
- utc-watchface-complication-provider.c
- utc-watchface-editable.c
-)
-
-PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
- ${CAPI_LIB}
- capi-appfw-application
- capi-system-info
- glib-2.0
- dlog
-
-)
-
-INCLUDE_DIRECTORIES(
- ${${CAPI_LIB}_INCLUDE_DIRS}
-)
-
-ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
-TARGET_LINK_LIBRARIES(${EXEC_NAME}
- ${${CAPI_LIB}_LIBRARIES}
-)
-
-INSTALL(PROGRAMS ${EXEC_NAME}
- DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
-)
-
-IF( DEFINED ASAN )
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall -pie -g -fsanitize=address -fsanitize-recover=address -U_FORTIFY_SOURCE -fno-omit-frame-pointer")
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -Wl,-fsanitize=address")
-ELSE()
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g -fPIE -Wall")
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
-ENDIF()
+++ /dev/null
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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 <stdio.h>
-#include <string.h>
-#include <malloc.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <glib.h>
-#include <stdbool.h>
-#include "tct_common.h"
-#include "utc-watchface-complication.h"
-#include <service_app.h>
-#include <watchface-complication-provider.h>
-#include <dlog.h>
-
-#ifdef WEARABLE
-#include "tct-watchface-complication-core_wearable.h"
-#endif
-#define COMPLICATION_TEST_APP "org.tizen.complication_test"
-
-static bool app_create(void *data)
-{
- return true;
-}
-
-static void app_control(app_control_h app_control, void *data)
-{
- char* pszGetTCName = NULL;
- int i=0, result=0, nRet=0;
- bool is_editing = false;
- char* caller_app_id = NULL;
- watchface_complication_event_type_e event_type = WATCHFACE_COMPLICATION_EVENT_NONE;
-
- watchface_complication_provider_setup_is_editing(app_control, &is_editing);
- if (is_editing) {
- bundle *context = NULL;
- char *cmd = NULL;
- watchface_complication_provider_setup_get_context(app_control, &context);
- bundle_get_str(context, "CONTEXT_DATA", &cmd);
-
- app_control_clone(&__test_control, app_control);
- if (cmd && strcmp(cmd, SETUP_IS_EDITING_TEST_VAL) == 0)
- _utc_watchface_complication_provider_setup_is_editing_p_checker();
- else if (cmd && strcmp(cmd, SETUP_REPLY_TO_EDITOR_TEST_VAL) == 0)
- _utc_watchface_complication_provider_setup_reply_to_editor_p_checker();
- else if (cmd && strcmp(cmd, SETUP_GET_CONTEXT_TEST_VAL) == 0)
- _utc_watchface_complication_provider_setup_get_context_p_checker();
- return;
- }
-
- nRet = watchface_complication_provider_event_get_type(app_control, &event_type);
- if (event_type != WATCHFACE_COMPLICATION_EVENT_NONE) {
- app_control_clone(&__test_control, app_control);
- if (__event_cmd && strcmp(__event_cmd, EVENT_GET_EVENT_TYPE_TEST_VAL) == 0)
- __utc_watchface_complication_provider_event_get_type_p_checker();
- else if (__event_cmd && strcmp(__event_cmd, EVENT_GET_PROVIDER_ID_TEST_VAL) == 0)
- __utc_watchface_complication_provider_event_get_provider_id_p_checker();
- else if (__event_cmd && strcmp(__event_cmd, EVENT_GET_COMP_TYPE_TEST_VAL) == 0)
- __utc_watchface_complication_provider_event_get_complication_type_p_checker();
- else if (__event_cmd && strcmp(__event_cmd, EVENT_GET_CONTEXT_TEST_VAL) == 0)
- __utc_watchface_complication_provider_event_get_context_p_checker();
- return;
- }
-
- app_control_get_caller(app_control, &caller_app_id);
- if (caller_app_id != NULL && strcmp(caller_app_id, COMPLICATION_TEST_APP) == 0) {
- free(caller_app_id);
- return;
- }
- free(caller_app_id);
-
- nRet = app_control_get_extra_data(app_control, "testcase_name", &pszGetTCName);
- if(nRet != APP_CONTROL_ERROR_NONE)
- {
- dlog_print(DLOG_ERROR, "NativeTCT", "[%s:%d] app_control_get_extra_data returns error = %d", __FUNCTION__, __LINE__, nRet);
- PRINT_UTC_LOG("\\n[%s][Line : %d]Unable to fetch test case name: app_control_get_extra_data API call fails\\n", __FILE__, __LINE__);
- PRINT_TC_RESULT("%d",1);
- FREE_MEMORY_TC(pszGetTCName);
- return;
- }
-
- dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Executing TC Name = %s", __FUNCTION__, __LINE__, pszGetTCName);
- for ( i = 0; tc_array[i].name; i++ )
- {
- if ( 0 == strncmp(pszGetTCName, tc_array[i].name, strlen(pszGetTCName)) )
- {
- DUMP_UTC_ERRLOG();
- dlog_print(DLOG_INFO, "NativeTCT", "%s : Startup begin", pszGetTCName);
- if ( tc_array[i].startup )
- {
- tc_array[i].startup();
- }
- dlog_print(DLOG_INFO, "NativeTCT", "%s : Startup end", pszGetTCName);
-
- dlog_print(DLOG_INFO, "NativeTCT", "%s : Body begin", pszGetTCName);
- result = tc_array[i].function();
- dlog_print(DLOG_INFO, "NativeTCT", "%s returns value = %d", pszGetTCName, result);
- dlog_print(DLOG_INFO, "NativeTCT", "%s : Body end", pszGetTCName);
-
- dlog_print(DLOG_INFO, "NativeTCT", "%s : Cleanup begin", pszGetTCName);
- if ( tc_array[i].cleanup )
- {
- tc_array[i].cleanup();
- }
- dlog_print(DLOG_INFO, "NativeTCT", "%s : Cleanup end", pszGetTCName);
- CLOSE_UTC_ERRLOG();
- FREE_MEMORY_TC(pszGetTCName);
- return;
- }
- }
-
- dlog_print(DLOG_ERROR, "NativeTCT", "[%s:%d] Unable to execute %s : Unknown Test Case Name", __FUNCTION__, __LINE__, pszGetTCName);
- PRINT_UTC_LOG("\\n[%s][Line : %d]Unable to execute %s : Unknown Test Case Name\\n", __FILE__, __LINE__, pszGetTCName);
- PRINT_TC_RESULT("%d",1);
- FREE_MEMORY_TC(pszGetTCName);
- return;
-}
-
-static void app_terminate(void *data)
-{
- dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Application Package is now Terminating", __FUNCTION__, __LINE__);
-}
-
-int main(int argc, char *argv[])
-{
- int ret = 0;
-
- service_app_lifecycle_callback_s event_callback = {0,};
- event_callback.create = app_create;
- event_callback.terminate = app_terminate;
- event_callback.app_control = app_control;
-
- //setting gcda file location for coverage
- setenv("GCOV_PREFIX","/tmp",1);
- dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Coverage *.gcda File location set to /tmp/home/abuild/rpmbuild/BUILD/ ", __FUNCTION__, __LINE__);
-
- dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Application Main Function is Invoked", __FUNCTION__, __LINE__);
- ret = service_app_main(argc, argv, &event_callback, NULL);
- if (ret != APP_ERROR_NONE)
- {
- dlog_print(DLOG_ERROR, "NativeTCT", "Application service_app_main call gets failed. err = %d", ret);
- PRINT_UTC_LOG("\\n[%s][Line : %d]Application service_app_main call gets failed. err = %d\\n", __FILE__, __LINE__, ret);
- PRINT_TC_RESULT("%d",1);
- return ret;
- }
- PRINT_TC_RESULT("%d", __result);
- dlog_print(DLOG_INFO, "NativeTCT", "result [%d] ", ret);
-
- dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Application Package is Terminated", __FUNCTION__, __LINE__);
- return ret;
-}
-
+++ /dev/null
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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 __TCT_WATCHFACE_COMPLICATION_NATIVE_H__
-#define __TCT_WATCHFACE_COMPLICATION_NATIVE_H__
-
-#include "testcase.h"
-#include "tct_common.h"
-
-extern void utc_watchface_complication_startup(void);
-extern void utc_watchface_complication_cleanup(void);
-extern int utc_watchface_complication_get_current_provider_id_p(void);
-extern int utc_watchface_complication_get_current_provider_id_n1(void);
-extern int utc_watchface_complication_get_current_type_p(void);
-extern int utc_watchface_complication_get_current_type_n1(void);
-extern int utc_watchface_complication_add_updated_cb_p(void);
-extern int utc_watchface_complication_add_updated_cb_n1(void);
-extern int utc_watchface_complication_remove_updated_cb_p(void);
-extern int utc_watchface_complication_remove_updated_cb_n1(void);
-extern int utc_watchface_complication_send_update_request_p(void);
-extern int utc_watchface_complication_send_update_request_n1(void);
-extern int utc_watchface_complication_create_p(void);
-extern int utc_watchface_complication_create_n1(void);
-extern int utc_watchface_complication_destroy_p(void);
-extern int utc_watchface_complication_destroy_n1(void);
-extern int utc_watchface_complication_data_get_type_n1(void);
-extern int utc_watchface_complication_data_get_short_text_p1(void);
-extern int utc_watchface_complication_data_get_short_text_n1(void);
-extern int utc_watchface_complication_data_get_long_text_p1(void);
-extern int utc_watchface_complication_data_get_long_text_n1(void);
-extern int utc_watchface_complication_data_get_title_p1(void);
-extern int utc_watchface_complication_data_get_title_n1(void);
-extern int utc_watchface_complication_data_get_timestamp_p1(void);
-extern int utc_watchface_complication_data_get_timestamp_n1(void);
-extern int utc_watchface_complication_data_get_image_path_p1(void);
-extern int utc_watchface_complication_data_get_image_path_n1(void);
-extern int utc_watchface_complication_data_get_ranged_value_p1(void);
-extern int utc_watchface_complication_data_get_ranged_value_n1(void);
-extern int utc_watchface_complication_data_get_icon_path_p1(void);
-extern int utc_watchface_complication_data_get_icon_path_n1(void);
-extern int utc_watchface_complication_data_get_extra_data_p1(void);
-extern int utc_watchface_complication_data_get_extra_data_n1(void);
-extern int utc_watchface_complication_data_get_screen_reader_text_p(void);
-extern int utc_watchface_complication_data_get_screen_reader_text_n1(void);
-extern int utc_watchface_complication_data_get_screen_reader_text_n2(void);
-extern int utc_watchface_complication_allowed_list_create_p(void);
-extern int utc_watchface_complication_allowed_list_create_n1(void);
-extern int utc_watchface_complication_allowed_list_destroy_p(void);
-extern int utc_watchface_complication_allowed_list_destroy_n1(void);
-extern int utc_watchface_complication_allowed_list_add_p(void);
-extern int utc_watchface_complication_allowed_list_add_n1(void);
-extern int utc_watchface_complication_allowed_list_add_n2(void);
-extern int utc_watchface_complication_allowed_list_get_nth_p(void);
-extern int utc_watchface_complication_allowed_list_get_nth_n1(void);
-extern int utc_watchface_complication_allowed_list_delete_p(void);
-extern int utc_watchface_complication_allowed_list_delete_n1(void);
-extern int utc_watchface_complication_allowed_list_delete_n2(void);
-extern int utc_watchface_complication_allowed_list_apply_p(void);
-extern int utc_watchface_complication_allowed_list_apply_n1(void);
-extern int utc_watchface_complication_allowed_list_clear_p(void);
-extern int utc_watchface_complication_allowed_list_clear_n1(void);
-extern int utc_watchface_complication_transfer_event_p(void);
-extern int utc_watchface_complication_transfer_event_n1(void);
-extern int utc_watchface_complication_transfer_event_n2(void);
-extern int utc_watchface_complication_data_get_timeinfo_p(void);
-extern int utc_watchface_complication_data_get_timeinfo_n(void);
-extern int utc_watchface_complication_timeinfo_get_timezone_p(void);
-extern int utc_watchface_complication_timeinfo_get_timezone_n(void);
-extern int utc_watchface_complication_timeinfo_get_timezone_id_p(void);
-extern int utc_watchface_complication_timeinfo_get_timezone_id_n(void);
-extern int utc_watchface_complication_timeinfo_get_timezone_country_p(void);
-extern int utc_watchface_complication_timeinfo_get_timezone_country_n(void);
-extern int utc_watchface_complication_timeinfo_get_timezone_city_p(void);
-extern int utc_watchface_complication_timeinfo_get_timezone_city_n(void);
-extern int utc_watchface_complication_timeinfo_get_timestamp_p(void);
-extern int utc_watchface_complication_timeinfo_get_timestamp_n(void);
-
-extern void utc_watchface_complication_provider_startup(void);
-extern void utc_watchface_complication_provider_cleanup(void);
-extern int utc_watchface_complication_provider_add_update_requested_cb_p(void);
-extern int utc_watchface_complication_provider_add_update_requested_cb_n1(void);
-extern int utc_watchface_complication_provider_remove_update_requested_cb_p(void);
-extern int utc_watchface_complication_provider_remove_update_requested_cb_n1(void);
-extern int utc_watchface_complication_provider_notify_update_p(void);
-extern int utc_watchface_complication_provider_notify_update_n1(void);
-extern void _utc_watchface_complication_provider_setup_is_editing_p_checker(void);
-extern int utc_watchface_complication_provider_setup_is_editing_p(void);
-extern int utc_watchface_complication_provider_setup_is_editing_n1(void);
-extern void _utc_watchface_complication_provider_setup_reply_to_editor_p_checker(void);
-extern int utc_watchface_complication_provider_setup_reply_to_editor_p(void);
-extern int utc_watchface_complication_provider_setup_reply_to_editor_n1(void);
-extern void _utc_watchface_complication_provider_setup_get_context_p_checker(void);
-extern int utc_watchface_complication_provider_setup_get_context_p(void);
-extern int utc_watchface_complication_provider_setup_get_context_n1(void);
-extern int utc_watchface_complication_provider_data_set_short_text_p(void);
-extern int utc_watchface_complication_provider_data_set_short_text_n1(void);
-extern int utc_watchface_complication_provider_data_set_long_text_p(void);
-extern int utc_watchface_complication_provider_data_set_long_text_n1(void);
-extern int utc_watchface_complication_provider_data_set_title_p(void);
-extern int utc_watchface_complication_provider_data_set_title_n1(void);
-extern int utc_watchface_complication_provider_data_set_timestamp_p(void);
-extern int utc_watchface_complication_provider_data_set_timestamp_n1(void);
-extern int utc_watchface_complication_provider_data_set_image_path_p(void);
-extern int utc_watchface_complication_provider_data_set_image_path_n1(void);
-extern int utc_watchface_complication_provider_data_set_ranged_value_p(void);
-extern int utc_watchface_complication_provider_data_set_ranged_value_n1(void);
-extern int utc_watchface_complication_provider_data_set_icon_path_p(void);
-extern int utc_watchface_complication_provider_data_set_icon_path_n1(void);
-extern int utc_watchface_complication_provider_data_set_extra_data_p(void);
-extern int utc_watchface_complication_provider_data_set_extra_data_n1(void);
-extern int utc_watchface_complication_provider_data_is_valid_p(void);
-extern int utc_watchface_complication_provider_data_is_valid_n1(void);
-extern int utc_watchface_complication_provider_data_is_valid_n2(void);
-extern int utc_watchface_complication_provider_event_get_type_p(void);
-extern int utc_watchface_complication_provider_event_get_type_n1(void);
-extern int utc_watchface_complication_provider_event_get_provider_id_p(void);
-extern int utc_watchface_complication_provider_event_get_provider_id_n1(void);
-extern int utc_watchface_complication_provider_event_get_complication_type_p(void);
-extern int utc_watchface_complication_provider_event_get_complication_type_n1(void);
-extern int utc_watchface_complication_provider_event_get_context_p(void);
-extern int utc_watchface_complication_provider_event_get_context_n1(void);
-extern int utc_watchface_complication_provider_timeinfo_create_p1(void);
-extern int utc_watchface_complication_provider_timeinfo_create_n1(void);
-extern int utc_watchface_complication_provider_timeinfo_destroy_p1(void);
-extern int utc_watchface_complication_provider_timeinfo_destroy_n1(void);
-extern int utc_watchface_complication_provider_timeinfo_set_timezone_p(void);
-extern int utc_watchface_complication_provider_timeinfo_set_timezone_n1(void);
-extern int utc_watchface_complication_provider_timeinfo_set_timezone_id_p(void);
-extern int utc_watchface_complication_provider_timeinfo_set_timezone_id_n1(void);
-extern int utc_watchface_complication_provider_timeinfo_set_timezone_country_p(void);
-extern int utc_watchface_complication_provider_timeinfo_set_timezone_country_n1(void);
-extern int utc_watchface_complication_provider_timeinfo_set_timezone_city_p(void);
-extern int utc_watchface_complication_provider_timeinfo_set_timezone_city_n1(void);
-extern void __utc_watchface_complication_provider_event_get_type_p_checker(void);
-extern void __utc_watchface_complication_provider_event_get_provider_id_p_checker(void);
-extern void __utc_watchface_complication_provider_event_get_complication_type_p_checker(void);
-extern void __utc_watchface_complication_provider_event_get_context_p_checker(void);
-
-extern void utc_watchface_editable_startup(void);
-extern void utc_watchface_editable_cleanup(void);
-extern int utc_watchface_editable_candidates_list_create_n(void);
-extern int utc_watchface_editable_candidates_list_create_p(void);
-extern int utc_watchface_editable_candidates_list_add_n1(void);
-extern int utc_watchface_editable_candidates_list_add_n2(void);
-extern int utc_watchface_editable_candidates_list_add_p(void);
-extern int utc_watchface_editable_candidates_list_destroy_n(void);
-extern int utc_watchface_editable_candidates_list_destroy_p(void);
-extern int utc_watchface_editable_add_design_element_n1(void);
-extern int utc_watchface_editable_add_design_element_n2(void);
-extern int utc_watchface_editable_add_design_element_n3(void);
-extern int utc_watchface_editable_add_design_element_p(void);
-extern int utc_watchface_editable_add_complication_n1(void);
-extern int utc_watchface_editable_add_complication_n2(void);
-extern int utc_watchface_editable_add_complication_p(void);
-extern int utc_watchface_editable_request_edit_n1(void);
-extern int utc_watchface_editable_request_edit_n2(void);
-extern int utc_watchface_editable_request_edit_p(void);
-extern int utc_watchface_editable_add_edit_ready_cb_n(void);
-extern int utc_watchface_editable_add_edit_ready_cb_p(void);
-extern int utc_watchface_editable_remove_edit_ready_cb_n(void);
-extern int utc_watchface_editable_remove_edit_ready_cb_p(void);
-extern int utc_watchface_editable_get_editable_name_n1(void);
-extern int utc_watchface_editable_get_editable_name_n2(void);
-extern int utc_watchface_editable_get_editable_name_p(void);
-extern int utc_watchface_editable_set_editable_name_n1(void);
-extern int utc_watchface_editable_set_editable_name_n2(void);
-extern int utc_watchface_editable_set_editable_name_p(void);
-extern int utc_watchface_editable_get_nth_data_n1(void);
-extern int utc_watchface_editable_get_nth_data_n2(void);
-extern int utc_watchface_editable_get_nth_data_p(void);
-extern int utc_watchface_editable_get_current_data_n1(void);
-extern int utc_watchface_editable_get_current_data_n2(void);
-extern int utc_watchface_editable_get_current_data_p(void);
-extern int utc_watchface_editable_get_current_data_idx_n1(void);
-extern int utc_watchface_editable_get_current_data_idx_n2(void);
-extern int utc_watchface_editable_get_current_data_idx_p(void);
-extern int utc_watchface_editable_get_editable_id_n1(void);
-extern int utc_watchface_editable_get_editable_id_n2(void);
-extern int utc_watchface_editable_get_editable_id_p(void);
-extern int utc_watchface_editable_get_highlight_n1(void);
-extern int utc_watchface_editable_get_highlight_n2(void);
-extern int utc_watchface_editable_get_highlight_p(void);
-extern int utc_watchface_editable_load_current_data_n(void);
-extern int utc_watchface_editable_load_current_data_p(void);
-extern int utc_watchface_editable_highlight_create_n(void);
-extern int utc_watchface_editable_highlight_create_p(void);
-extern int utc_watchface_editable_highlight_destroy_n(void);
-extern int utc_watchface_editable_highlight_destroy_p(void);
-extern int utc_watchface_editable_highlight_set_geometry_n(void);
-extern int utc_watchface_editable_highlight_set_geometry_p(void);
-extern int utc_watchface_editable_highlight_get_geometry_n1(void);
-extern int utc_watchface_editable_highlight_get_geometry_n2(void);
-extern int utc_watchface_editable_highlight_get_geometry_n3(void);
-extern int utc_watchface_editable_highlight_get_geometry_n4(void);
-extern int utc_watchface_editable_highlight_get_geometry_n5(void);
-extern int utc_watchface_editable_highlight_get_geometry_p(void);
-extern int utc_watchface_editable_highlight_set_shape_type_p(void);
-extern int utc_watchface_editable_highlight_set_shape_type_n1(void);
-extern int utc_watchface_editable_highlight_set_shape_type_n2(void);
-extern int utc_watchface_editable_highlight_get_shape_type_p(void);
-extern int utc_watchface_editable_highlight_get_shape_type_n1(void);
-extern int utc_watchface_editable_highlight_get_shape_type_n2(void);
-
-testcase tc_array[] = {
- {"utc_watchface_complication_get_current_provider_id_p",utc_watchface_complication_get_current_provider_id_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_get_current_provider_id_n1",utc_watchface_complication_get_current_provider_id_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_get_current_type_p",utc_watchface_complication_get_current_type_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_get_current_type_n1",utc_watchface_complication_get_current_type_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_add_updated_cb_p",utc_watchface_complication_add_updated_cb_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_add_updated_cb_n1",utc_watchface_complication_add_updated_cb_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_remove_updated_cb_p",utc_watchface_complication_remove_updated_cb_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_remove_updated_cb_n1",utc_watchface_complication_remove_updated_cb_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_send_update_request_p",utc_watchface_complication_send_update_request_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_send_update_request_n1",utc_watchface_complication_send_update_request_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_create_p",utc_watchface_complication_create_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_create_n1",utc_watchface_complication_create_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_destroy_p",utc_watchface_complication_destroy_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_destroy_n1",utc_watchface_complication_destroy_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_type_n1",utc_watchface_complication_data_get_type_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_short_text_p1",utc_watchface_complication_data_get_short_text_p1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_short_text_n1",utc_watchface_complication_data_get_short_text_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_long_text_p1",utc_watchface_complication_data_get_long_text_p1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_long_text_n1",utc_watchface_complication_data_get_long_text_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_title_p1",utc_watchface_complication_data_get_title_p1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_title_n1",utc_watchface_complication_data_get_title_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_timestamp_p1",utc_watchface_complication_data_get_timestamp_p1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_timestamp_n1",utc_watchface_complication_data_get_timestamp_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_image_path_p1",utc_watchface_complication_data_get_image_path_p1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_image_path_n1",utc_watchface_complication_data_get_image_path_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_ranged_value_p1",utc_watchface_complication_data_get_ranged_value_p1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_ranged_value_n1",utc_watchface_complication_data_get_ranged_value_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_icon_path_p1",utc_watchface_complication_data_get_icon_path_p1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_icon_path_n1",utc_watchface_complication_data_get_icon_path_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_extra_data_p1",utc_watchface_complication_data_get_extra_data_p1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_extra_data_n1",utc_watchface_complication_data_get_extra_data_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_screen_reader_text_p",utc_watchface_complication_data_get_screen_reader_text_p,NULL,NULL},
- {"utc_watchface_complication_data_get_screen_reader_text_n1",utc_watchface_complication_data_get_screen_reader_text_n1,NULL,NULL},
- {"utc_watchface_complication_data_get_screen_reader_text_n2",utc_watchface_complication_data_get_screen_reader_text_n2,NULL,NULL},
- {"utc_watchface_complication_allowed_list_create_p",utc_watchface_complication_allowed_list_create_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_allowed_list_create_n1",utc_watchface_complication_allowed_list_create_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_allowed_list_destroy_p",utc_watchface_complication_allowed_list_destroy_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_allowed_list_destroy_n1",utc_watchface_complication_allowed_list_destroy_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_allowed_list_add_p",utc_watchface_complication_allowed_list_add_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_allowed_list_add_n1",utc_watchface_complication_allowed_list_add_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_allowed_list_get_nth_p",utc_watchface_complication_allowed_list_get_nth_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_allowed_list_get_nth_n1",utc_watchface_complication_allowed_list_get_nth_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_allowed_list_add_n2",utc_watchface_complication_allowed_list_add_n2,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_allowed_list_delete_p",utc_watchface_complication_allowed_list_delete_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_allowed_list_delete_n1",utc_watchface_complication_allowed_list_delete_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_allowed_list_delete_n2",utc_watchface_complication_allowed_list_delete_n2,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_allowed_list_apply_p",utc_watchface_complication_allowed_list_apply_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_allowed_list_apply_n1",utc_watchface_complication_allowed_list_apply_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_allowed_list_clear_p",utc_watchface_complication_allowed_list_clear_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_allowed_list_clear_n1",utc_watchface_complication_allowed_list_clear_n1,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_transfer_event_p",utc_watchface_complication_transfer_event_p,NULL,NULL},
- {"utc_watchface_complication_transfer_event_n1",utc_watchface_complication_transfer_event_n1,NULL,NULL},
- {"utc_watchface_complication_transfer_event_n2",utc_watchface_complication_transfer_event_n2,NULL,NULL},
- {"utc_watchface_complication_data_get_timeinfo_p",utc_watchface_complication_data_get_timeinfo_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_data_get_timeinfo_n",utc_watchface_complication_data_get_timeinfo_n,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_timeinfo_get_timezone_p",utc_watchface_complication_timeinfo_get_timezone_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_timeinfo_get_timezone_n",utc_watchface_complication_timeinfo_get_timezone_n,utc_watchface_complication_startup,utc_watchface_complication_cleanup},{"utc_watchface_complication_timeinfo_get_timezone_id_p",utc_watchface_complication_timeinfo_get_timezone_id_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},{"utc_watchface_complication_timeinfo_get_timezone_id_n",utc_watchface_complication_timeinfo_get_timezone_id_n,utc_watchface_complication_startup,utc_watchface_complication_cleanup},{"utc_watchface_complication_timeinfo_get_timezone_country_p",utc_watchface_complication_timeinfo_get_timezone_country_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},{"utc_watchface_complication_timeinfo_get_timezone_country_n",utc_watchface_complication_timeinfo_get_timezone_country_n,utc_watchface_complication_startup,utc_watchface_complication_cleanup},{"utc_watchface_complication_timeinfo_get_timezone_city_p",utc_watchface_complication_timeinfo_get_timezone_city_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_timeinfo_get_timezone_city_n",utc_watchface_complication_timeinfo_get_timezone_city_n,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_timeinfo_get_timestamp_p",utc_watchface_complication_timeinfo_get_timestamp_p,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
- {"utc_watchface_complication_timeinfo_get_timestamp_n",utc_watchface_complication_timeinfo_get_timestamp_n,utc_watchface_complication_startup,utc_watchface_complication_cleanup},
-
- {"utc_watchface_complication_provider_add_update_requested_cb_p",utc_watchface_complication_provider_add_update_requested_cb_p,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_add_update_requested_cb_n1",utc_watchface_complication_provider_add_update_requested_cb_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_remove_update_requested_cb_p",utc_watchface_complication_provider_remove_update_requested_cb_p,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_remove_update_requested_cb_n1",utc_watchface_complication_provider_remove_update_requested_cb_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_notify_update_p",utc_watchface_complication_provider_notify_update_p,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_notify_update_n1",utc_watchface_complication_provider_notify_update_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_setup_is_editing_p",utc_watchface_complication_provider_setup_is_editing_p,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_setup_is_editing_n1",utc_watchface_complication_provider_setup_is_editing_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_setup_reply_to_editor_p",utc_watchface_complication_provider_setup_reply_to_editor_p,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_setup_reply_to_editor_n1",utc_watchface_complication_provider_setup_reply_to_editor_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_setup_get_context_p",utc_watchface_complication_provider_setup_get_context_p,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_setup_get_context_n1",utc_watchface_complication_provider_setup_get_context_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_data_set_short_text_p",utc_watchface_complication_provider_data_set_short_text_p,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_data_set_short_text_n1",utc_watchface_complication_provider_data_set_short_text_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_data_set_long_text_p",utc_watchface_complication_provider_data_set_long_text_p,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_data_set_long_text_n1",utc_watchface_complication_provider_data_set_long_text_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_data_set_title_p",utc_watchface_complication_provider_data_set_title_p,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_data_set_title_n1",utc_watchface_complication_provider_data_set_title_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_data_set_timestamp_p",utc_watchface_complication_provider_data_set_timestamp_p,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_data_set_timestamp_n1",utc_watchface_complication_provider_data_set_timestamp_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_data_set_image_path_p",utc_watchface_complication_provider_data_set_image_path_p,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_data_set_image_path_n1",utc_watchface_complication_provider_data_set_image_path_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_data_set_ranged_value_p",utc_watchface_complication_provider_data_set_ranged_value_p,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_data_set_ranged_value_n1",utc_watchface_complication_provider_data_set_ranged_value_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_data_set_icon_path_p",utc_watchface_complication_provider_data_set_icon_path_p,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_data_set_icon_path_n1",utc_watchface_complication_provider_data_set_icon_path_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_data_set_extra_data_p",utc_watchface_complication_provider_data_set_extra_data_p,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_data_set_extra_data_n1",utc_watchface_complication_provider_data_set_extra_data_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_data_is_valid_p",utc_watchface_complication_provider_data_is_valid_p,NULL,NULL},
- {"utc_watchface_complication_provider_data_is_valid_n1",utc_watchface_complication_provider_data_is_valid_n1,NULL,NULL},
- {"utc_watchface_complication_provider_data_is_valid_n2",utc_watchface_complication_provider_data_is_valid_n2,NULL,NULL},
- {"utc_watchface_complication_provider_event_get_type_p",utc_watchface_complication_provider_event_get_type_p,NULL,NULL},
- {"utc_watchface_complication_provider_event_get_type_n1",utc_watchface_complication_provider_event_get_type_n1,NULL,NULL},
- {"utc_watchface_complication_provider_event_get_provider_id_p",utc_watchface_complication_provider_event_get_provider_id_p,NULL,NULL},
- {"utc_watchface_complication_provider_event_get_provider_id_n1",utc_watchface_complication_provider_event_get_provider_id_n1,NULL,NULL},
- {"utc_watchface_complication_provider_event_get_complication_type_p",utc_watchface_complication_provider_event_get_complication_type_p,NULL,NULL},
- {"utc_watchface_complication_provider_event_get_complication_type_n1",utc_watchface_complication_provider_event_get_complication_type_n1,NULL,NULL},
- {"utc_watchface_complication_provider_event_get_context_p",utc_watchface_complication_provider_event_get_context_p,NULL,NULL},
- {"utc_watchface_complication_provider_event_get_context_n1",utc_watchface_complication_provider_event_get_context_n1,NULL,NULL},
- {"utc_watchface_complication_provider_timeinfo_create_p1",utc_watchface_complication_provider_timeinfo_create_p1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_timeinfo_create_n1",utc_watchface_complication_provider_timeinfo_create_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_timeinfo_destroy_p1",utc_watchface_complication_provider_timeinfo_destroy_p1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_timeinfo_destroy_n1",utc_watchface_complication_provider_timeinfo_destroy_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_timeinfo_set_timezone_p",utc_watchface_complication_provider_timeinfo_set_timezone_p,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_timeinfo_set_timezone_n1",utc_watchface_complication_provider_timeinfo_set_timezone_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_timeinfo_set_timezone_id_p",utc_watchface_complication_provider_timeinfo_set_timezone_id_p,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_timeinfo_set_timezone_id_n1",utc_watchface_complication_provider_timeinfo_set_timezone_id_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_timeinfo_set_timezone_country_p",utc_watchface_complication_provider_timeinfo_set_timezone_country_p,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_timeinfo_set_timezone_country_n1",utc_watchface_complication_provider_timeinfo_set_timezone_country_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_timeinfo_set_timezone_city_p",utc_watchface_complication_provider_timeinfo_set_timezone_city_p,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
- {"utc_watchface_complication_provider_timeinfo_set_timezone_city_n1",utc_watchface_complication_provider_timeinfo_set_timezone_city_n1,utc_watchface_complication_provider_startup,utc_watchface_complication_provider_cleanup},
-
- {"utc_watchface_editable_candidates_list_create_n", utc_watchface_editable_candidates_list_create_n, NULL, NULL},
- {"utc_watchface_editable_candidates_list_create_p", utc_watchface_editable_candidates_list_create_p, NULL, NULL},
- {"utc_watchface_editable_candidates_list_add_n1", utc_watchface_editable_candidates_list_add_n1, NULL, NULL},
- {"utc_watchface_editable_candidates_list_add_n2", utc_watchface_editable_candidates_list_add_n2, NULL, NULL},
- {"utc_watchface_editable_candidates_list_add_p", utc_watchface_editable_candidates_list_add_p, NULL, NULL},
- {"utc_watchface_editable_candidates_list_destroy_n", utc_watchface_editable_candidates_list_destroy_n, NULL, NULL},
- {"utc_watchface_editable_candidates_list_destroy_p", utc_watchface_editable_candidates_list_destroy_p, NULL, NULL},
- {"utc_watchface_editable_add_design_element_n1", utc_watchface_editable_add_design_element_n1, NULL, NULL},
- {"utc_watchface_editable_add_design_element_n2", utc_watchface_editable_add_design_element_n2, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_add_design_element_n3", utc_watchface_editable_add_design_element_n3, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_add_design_element_p", utc_watchface_editable_add_design_element_p, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_add_complication_n1", utc_watchface_editable_add_complication_n1, NULL, NULL},
- {"utc_watchface_editable_add_complication_n2", utc_watchface_editable_add_complication_n2, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_add_complication_p", utc_watchface_editable_add_complication_p, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_request_edit_n1", utc_watchface_editable_request_edit_n1, NULL, NULL},
- {"utc_watchface_editable_request_edit_n2", utc_watchface_editable_request_edit_n2, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_request_edit_p", utc_watchface_editable_request_edit_p, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_add_edit_ready_cb_n", utc_watchface_editable_add_edit_ready_cb_n, NULL, NULL},
- {"utc_watchface_editable_add_edit_ready_cb_p", utc_watchface_editable_add_edit_ready_cb_p, NULL, NULL},
- {"utc_watchface_editable_remove_edit_ready_cb_n", utc_watchface_editable_remove_edit_ready_cb_n, NULL, NULL},
- {"utc_watchface_editable_remove_edit_ready_cb_p", utc_watchface_editable_remove_edit_ready_cb_p, NULL, NULL},
- {"utc_watchface_editable_get_editable_name_n1", utc_watchface_editable_get_editable_name_n1, NULL, NULL},
- {"utc_watchface_editable_get_editable_name_n2", utc_watchface_editable_get_editable_name_n2, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_get_editable_name_p", utc_watchface_editable_get_editable_name_p, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_set_editable_name_n1", utc_watchface_editable_set_editable_name_n1, NULL, NULL},
- {"utc_watchface_editable_set_editable_name_n2", utc_watchface_editable_set_editable_name_n2, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_set_editable_name_p", utc_watchface_editable_set_editable_name_p, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_get_nth_data_n1", utc_watchface_editable_get_nth_data_n1, NULL, NULL},
- {"utc_watchface_editable_get_nth_data_n2", utc_watchface_editable_get_nth_data_n2, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_get_nth_data_p", utc_watchface_editable_get_nth_data_p, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_get_current_data_n1", utc_watchface_editable_get_current_data_n1, NULL, NULL},
- {"utc_watchface_editable_get_current_data_n2", utc_watchface_editable_get_current_data_n2, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_get_current_data_p", utc_watchface_editable_get_current_data_p, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_get_current_data_idx_n1", utc_watchface_editable_get_current_data_idx_n1, NULL, NULL},
- {"utc_watchface_editable_get_current_data_idx_n2", utc_watchface_editable_get_current_data_idx_n2, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_get_current_data_idx_p", utc_watchface_editable_get_current_data_idx_p, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_get_editable_id_n1", utc_watchface_editable_get_editable_id_n1, NULL, NULL},
- {"utc_watchface_editable_get_editable_id_n2", utc_watchface_editable_get_editable_id_n2, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_get_editable_id_p", utc_watchface_editable_get_editable_id_p, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_get_highlight_n1", utc_watchface_editable_get_highlight_n1, NULL, NULL},
- {"utc_watchface_editable_get_highlight_n2", utc_watchface_editable_get_highlight_n2, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_get_highlight_p", utc_watchface_editable_get_highlight_p, utc_watchface_editable_startup, utc_watchface_editable_cleanup},
- {"utc_watchface_editable_load_current_data_n", utc_watchface_editable_load_current_data_n, NULL, NULL},
- {"utc_watchface_editable_load_current_data_p", utc_watchface_editable_load_current_data_p, NULL, NULL},
- {"utc_watchface_editable_highlight_create_n", utc_watchface_editable_highlight_create_n, NULL, NULL},
- {"utc_watchface_editable_highlight_create_p", utc_watchface_editable_highlight_create_p, NULL, NULL},
- {"utc_watchface_editable_highlight_destroy_n", utc_watchface_editable_highlight_destroy_n, NULL, NULL},
- {"utc_watchface_editable_highlight_destroy_p", utc_watchface_editable_highlight_destroy_p, NULL, NULL},
- {"utc_watchface_editable_highlight_set_geometry_n", utc_watchface_editable_highlight_set_geometry_n, NULL, NULL},
- {"utc_watchface_editable_highlight_set_geometry_p", utc_watchface_editable_highlight_set_geometry_p, NULL, NULL},
- {"utc_watchface_editable_highlight_get_geometry_n1", utc_watchface_editable_highlight_get_geometry_n1, NULL, NULL},
- {"utc_watchface_editable_highlight_get_geometry_n2", utc_watchface_editable_highlight_get_geometry_n2, NULL, NULL},
- {"utc_watchface_editable_highlight_get_geometry_n3", utc_watchface_editable_highlight_get_geometry_n3, NULL, NULL},
- {"utc_watchface_editable_highlight_get_geometry_n4", utc_watchface_editable_highlight_get_geometry_n4, NULL, NULL},
- {"utc_watchface_editable_highlight_get_geometry_n5", utc_watchface_editable_highlight_get_geometry_n5, NULL, NULL},
- {"utc_watchface_editable_highlight_get_geometry_p", utc_watchface_editable_highlight_get_geometry_p, NULL, NULL},
- {"utc_watchface_editable_highlight_set_shape_type_p", utc_watchface_editable_highlight_set_shape_type_p, NULL, NULL},
- {"utc_watchface_editable_highlight_set_shape_type_n1", utc_watchface_editable_highlight_set_shape_type_n1, NULL, NULL},
- {"utc_watchface_editable_highlight_set_shape_type_n2", utc_watchface_editable_highlight_set_shape_type_n2, NULL, NULL},
- {"utc_watchface_editable_highlight_get_shape_type_p", utc_watchface_editable_highlight_get_shape_type_p, NULL, NULL},
- {"utc_watchface_editable_highlight_get_shape_type_n1", utc_watchface_editable_highlight_get_shape_type_n1, NULL, NULL},
- {"utc_watchface_editable_highlight_get_shape_type_n2", utc_watchface_editable_highlight_get_shape_type_n2, NULL, NULL},
- {NULL, NULL}
-};
-#endif // __TCT_WATCHFACE_COMPLICATION_NATIVE_H__
+++ /dev/null
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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 "assert.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <system_info.h>
-#include <app_manager.h>
-#include <watchface-complication-provider.h>
-#include <watchface-editable.h>
-#include <dlog.h>
-#include <glib.h>
-
-#include "utc-watchface-complication.h"
-
-#define WATCH_APP_FEATURE "http://tizen.org/feature/watch_app"
-#define TEST_PROVIDER_ID "org.tizen.watchface_sample_provider/test"
-#define PROVIDER_ID "org.tizen.watchface-complication-native-utc/test"
-#define EDITOR_CMD_KEY "EDITOR_CMD"
-#define EDITOR_ID "org.tizen.watchface_sample_editor"
-#define WATCHFACE_ID "org.tizen.watchface_sample"
-#define COMPLICATION_TEST_APP "org.tizen.complication_test"
-#define MAX_COUNTER 5
-static char __check_user_data[] = "check_user_data";
-static bool __is_supported = false;
-
-static void __run_app(char *target_app, char *key, char *value) {
- static app_control_h app_control;
- bool is_running = false;
- int counter = MAX_COUNTER;
- int ret;
-
- ret = app_control_create(&app_control);
- ret = app_control_set_app_id(app_control, target_app);
- if (key && value) {
- app_control_add_extra_data(app_control, key, value);
- }
- app_control_add_extra_data(app_control, "SENDER_ID", "org.tizen.watchface-complication-native-utc");
- do {
- ret = app_control_send_launch_request(app_control, NULL, NULL);
- if (ret != APP_CONTROL_ERROR_NONE)
- sleep(1);
- app_manager_is_running(target_app, &is_running);
- } while (--counter > 0 && !is_running);
- sleep(1);
-
- app_control_destroy(app_control);
-}
-
-void utc_watchface_complication_provider_startup(void)
-{
- system_info_get_platform_bool(WATCH_APP_FEATURE, &__is_supported);
-}
-
-void utc_watchface_complication_provider_cleanup(void)
-{
-}
-
-static void __complication_provider_update_requested_cb1(
- const char *provider_id, const char *req_appid,
- watchface_complication_type_e type, const bundle *context,
- bundle *share_data, void *user_data) {
-}
-
-static void __complication_provider_update_requested_cb2(
- const char *provider_id, const char *req_appid,
- watchface_complication_type_e type, const bundle *context,
- bundle *share_data, void *user_data) {
-}
-
-/**
- * @testcase watchface_complication_provider_add_update_requested_cb
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_provider_add_update_requested_cb()
- */
-int utc_watchface_complication_provider_add_update_requested_cb_p(void)
-{
- int ret;
-
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, __complication_provider_update_requested_cb1, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- normal_exit(0);
-}
-
-/**
- * @testcase watchface_complication_provider_add_update_requested_cb
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_add_update_requested_cb()
- */
-int utc_watchface_complication_provider_add_update_requested_cb_n1(void)
-{
- int ret;
-
- ret = watchface_complication_provider_add_update_requested_cb(NULL, NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_remove_update_requested_cb_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_provider_remove_update_requested_cb()
- */
-int utc_watchface_complication_provider_remove_update_requested_cb_p(void)
-{
- int ret;
-
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, __complication_provider_update_requested_cb2, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_provider_remove_update_requested_cb(
- PROVIDER_ID, __complication_provider_update_requested_cb2);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_remove_update_requested_cb_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_remove_update_requested_cb()
- */
-int utc_watchface_complication_provider_remove_update_requested_cb_n1(void)
-{
- int ret;
-
- ret = watchface_complication_provider_remove_update_requested_cb(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_notify_update_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_provider_notify_update()
- */
-int utc_watchface_complication_provider_notify_update_p(void)
-{
- int ret;
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, __complication_provider_update_requested_cb2, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_provider_notify_update(PROVIDER_ID);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_provider_remove_update_requested_cb(
- PROVIDER_ID, __complication_provider_update_requested_cb2);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_notify_update_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_notify_update()
- */
-int utc_watchface_complication_provider_notify_update_n1(void)
-{
- int ret;
-
- ret = watchface_complication_provider_notify_update(NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-void _utc_watchface_complication_provider_setup_reply_to_editor_p_checker(void) {
- int ret;
- bundle *context = bundle_create();
-
- ret = watchface_complication_provider_setup_reply_to_editor(__test_control, context);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- bundle_free(context);
- app_control_destroy(__test_control);
-
- normal_exit_no_returnval(0);
-}
-
-static void _update_requested_cb(const watchface_editable_h handle,
- int selected_idx,
- const watchface_editable_edit_state_e state,
- void *user_data)
-{
-}
-
-static void _setup_on_edit_ready(
- watchface_editable_container_h ed_con_h,
- const char *editor_appid,
- void *user_data) {
- int ret;
- int editable_id = 1;
- complication_h comp;
- watchface_editable_highlight_h highlight;
-
- ret = watchface_editable_highlight_create(&highlight,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_set_geometry(highlight,
- 100, 100, 30, 30);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_create(1, TEST_PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_EVENT_NONE, &comp);
-
- ret = watchface_editable_add_complication(ed_con_h, editable_id, comp, highlight);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_request_edit(ed_con_h, _update_requested_cb, NULL);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_setup_reply_to_editor_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_provider_setup_reply_to_editor()
- */
-int utc_watchface_complication_provider_setup_reply_to_editor_p(void)
-{
- int ret;
-
- ret = watchface_editable_add_edit_ready_cb(_setup_on_edit_ready, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- __run_app(EDITOR_ID, EDITOR_CMD_KEY, SETUP_REPLY_TO_EDITOR_TEST_VAL);
-
- return 0;
-}
-
-
-/**
- * @testcase utc_watchface_complication_provider_setup_reply_to_editor_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_setup_reply_to_editor()
- */
-int utc_watchface_complication_provider_setup_reply_to_editor_n1(void)
-{
- int ret;
-
- ret = watchface_complication_provider_setup_reply_to_editor(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-void _utc_watchface_complication_provider_setup_is_editing_p_checker(void) {
- int ret;
- bool is_editing;
-
- ret = watchface_complication_provider_setup_is_editing(__test_control, &is_editing);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- normal_exit_no_returnval(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_setup_is_editing_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_provider_setup_is_editing()
- */
-int utc_watchface_complication_provider_setup_is_editing_p(void)
-{
- int ret;
-
- ret = watchface_editable_add_edit_ready_cb(_setup_on_edit_ready, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- __run_app(EDITOR_ID, EDITOR_CMD_KEY, SETUP_IS_EDITING_TEST_VAL);
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_setup_is_editing_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_setup_is_editing()
- */
-int utc_watchface_complication_provider_setup_is_editing_n1(void)
-{
- int ret;
- bool is_editing;
-
- ret = watchface_complication_provider_setup_is_editing(NULL, &is_editing);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-void _utc_watchface_complication_provider_setup_get_context_p_checker(void) {
- int ret;
- bundle *context;
-
- ret = watchface_complication_provider_setup_get_context(__test_control, &context);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- bundle_free(context);
- app_control_destroy(__test_control);
-
- normal_exit_no_returnval(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_setup_get_context_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_provider_setup_get_context()
- */
-int utc_watchface_complication_provider_setup_get_context_p(void)
-{
- int ret;
-
- ret = watchface_editable_add_edit_ready_cb(_setup_on_edit_ready, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- __run_app(EDITOR_ID, EDITOR_CMD_KEY, SETUP_GET_CONTEXT_TEST_VAL);
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_setup_get_context_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_setup_get_context()
- */
-int utc_watchface_complication_provider_setup_get_context_n1(void)
-{
- int ret;
- bundle *b;
-
- ret = watchface_complication_provider_setup_get_context(NULL, &b);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-static void __update_requested_cb(
- const char *provider_id, const char *req_appid,
- watchface_complication_type_e type, const bundle *context,
- bundle *shared_data, void *user_data) {
- int ret = WATCHFACE_COMPLICATION_ERROR_IO_ERROR;
- complication_time_info_h info;
-
- switch(type) {
- case WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT :
- ret = watchface_complication_provider_data_set_short_text(
- shared_data, "short text");
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- ret = watchface_complication_provider_data_set_title(
- shared_data, "title");
- break;
- case WATCHFACE_COMPLICATION_TYPE_LONG_TEXT :
- ret = watchface_complication_provider_data_set_long_text(
- shared_data, "long text");
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- ret = watchface_complication_provider_data_set_extra_data(
- shared_data, "extra data");
- break;
- case WATCHFACE_COMPLICATION_TYPE_RANGED_VALUE :
- ret = watchface_complication_provider_data_set_ranged_value(
- shared_data, 50.0, 0.0, 100.0);
- break;
- case WATCHFACE_COMPLICATION_TYPE_ICON :
- ret = watchface_complication_provider_data_set_icon_path(
- shared_data, "temp_icon_path");
- break;
- case WATCHFACE_COMPLICATION_TYPE_IMAGE :
- ret = watchface_complication_provider_data_set_image_path(
- shared_data, "temp_image_path");
- break;
- case WATCHFACE_COMPLICATION_TYPE_TIME :
- ret = watchface_complication_provider_data_set_timestamp(
- shared_data, 12345);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- watchface_complication_provider_timeinfo_create(&info);
- ret = watchface_complication_provider_timeinfo_set_timezone(info, "UTC+9");
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_provider_timeinfo_set_timezone_id(info, "Asia/Seoul");
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_provider_timeinfo_set_timezone_country(info, "Korea");
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_provider_timeinfo_set_timezone_city(info, "Seoul");
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_provider_data_set_timeinfo(shared_data, info);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- watchface_complication_provider_timeinfo_destroy(info);
- break;
- default :
- break;
- }
-
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- normal_exit_no_returnval(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_short_text_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_provider_data_set_short_text()
- */
-int utc_watchface_complication_provider_data_set_short_text_p(void)
-{
- int ret;
-
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, __update_requested_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- __run_app(COMPLICATION_TEST_APP, "COMP_TYPE", "SHORT_TEXT");
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_short_text_n1
- * @since_tizen 5.0
- * @description Negative test case of utc_watchface_complication_provider_data_set_short_text_n1()
- */
-int utc_watchface_complication_provider_data_set_short_text_n1(void)
-{
- int ret;
- bundle *shared_data = bundle_create();
-
- ret = watchface_complication_provider_data_set_short_text(shared_data,
- "text data");
- bundle_free(shared_data);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_long_text_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_provider_data_set_long_text()
- */
-int utc_watchface_complication_provider_data_set_long_text_p(void)
-{
- int ret;
-
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, __update_requested_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- __run_app(COMPLICATION_TEST_APP, "COMP_TYPE", "LONG_TEXT");
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_long_text_n1
- * @since_tizen 5.0
- * @description Negative test case of utc_watchface_complication_provider_data_set_long_text_n1()
- */
-int utc_watchface_complication_provider_data_set_long_text_n1(void)
-{
- int ret;
- bundle *shared_data = bundle_create();
-
- ret = watchface_complication_provider_data_set_long_text(shared_data,
- "text data");
- bundle_free(shared_data);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_title_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_provider_data_set_title()
- */
-int utc_watchface_complication_provider_data_set_title_p(void)
-{
- int ret;
-
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, __update_requested_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- __run_app(COMPLICATION_TEST_APP, "COMP_TYPE", "SHORT_TEXT");
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_title_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_data_set_title()
- */
-int utc_watchface_complication_provider_data_set_title_n1(void)
-{
- int ret;
- bundle *shared_data = bundle_create();
-
- ret = watchface_complication_provider_data_set_title(NULL, "text data");
- bundle_free(shared_data);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_timestamp_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_provider_data_set_timestamp()
- */
-int utc_watchface_complication_provider_data_set_timestamp_p(void)
-{
- int ret;
-
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, __update_requested_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- __run_app(COMPLICATION_TEST_APP, "COMP_TYPE", "TIME");
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_timestamp_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_data_set_timestamp()
- */
-int utc_watchface_complication_provider_data_set_timestamp_n1(void)
-{
- int ret;
- time_t seconds;
- bundle *shared_data = bundle_create();
-
- seconds = time(NULL);
- ret = watchface_complication_provider_data_set_timestamp(
- shared_data, seconds);
- bundle_free(shared_data);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_image_path_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_provider_data_set_image_path()
- */
-int utc_watchface_complication_provider_data_set_image_path_p(void)
-{
- int ret;
-
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, __update_requested_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- __run_app(COMPLICATION_TEST_APP, "COMP_TYPE", "IMAGE");
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_image_path_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_data_set_image_path()
- */
-int utc_watchface_complication_provider_data_set_image_path_n1(void)
-{
- int ret;
- bundle *shared_data = bundle_create();
-
- ret = watchface_complication_provider_data_set_image_path(
- shared_data, "IMAGE PATH");
- bundle_free(shared_data);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_ranged_value_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_provider_data_set_ranged_value()
- */
-int utc_watchface_complication_provider_data_set_ranged_value_p(void)
-{
- int ret;
-
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, __update_requested_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- __run_app(COMPLICATION_TEST_APP, "COMP_TYPE", "RANGED_VALUE");
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_ranged_value_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_data_set_ranged_value()
- */
-int utc_watchface_complication_provider_data_set_ranged_value_n1(void)
-{
- int ret;
- bundle *shared_data = bundle_create();
-
- ret = watchface_complication_provider_data_set_ranged_value(
- shared_data, 50, 0, -1);
- bundle_free(shared_data);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_icon_path_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_provider_data_set_icon_path()
- */
-int utc_watchface_complication_provider_data_set_icon_path_p(void)
-{
- int ret;
-
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, __update_requested_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- __run_app(COMPLICATION_TEST_APP, "COMP_TYPE", "ICON");
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_icon_path_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_data_set_icon_path()
- */
-int utc_watchface_complication_provider_data_set_icon_path_n1(void)
-{
- int ret;
- bundle *shared_data = bundle_create();
-
- ret = watchface_complication_provider_data_set_icon_path(
- shared_data, "ICON PATH");
- bundle_free(shared_data);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_extra_data_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_provider_data_set_extra_data()
- */
-int utc_watchface_complication_provider_data_set_extra_data_p(void)
-{
- int ret;
-
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, __update_requested_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- __run_app(COMPLICATION_TEST_APP, "COMP_TYPE", "LONG_TEXT");
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_extra_data_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_data_set_extra_data()
- */
-int utc_watchface_complication_provider_data_set_extra_data_n1(void)
-{
- int ret;
- bundle *shared_data = bundle_create();
-
- ret = watchface_complication_provider_data_set_extra_data(
- shared_data, NULL);
- bundle_free(shared_data);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_screen_reader_text_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_provider_data_set_screen_reader_text()
- */
-int utc_watchface_complication_provider_data_set_screen_reader_text_p(void)
-{
- int ret;
- bundle *shared_data = bundle_create();
-
- ret = watchface_complication_provider_data_set_screen_reader_text(
- shared_data, "screen_reader_text test");
- bundle_free(shared_data);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_screen_reader_text_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_data_set_screen_reader_text()
- */
-int utc_watchface_complication_provider_data_set_screen_reader_text_n1(void)
-{
- int ret;
- bundle *shared_data = bundle_create();
-
- ret = watchface_complication_provider_data_set_screen_reader_text(
- shared_data, NULL);
- bundle_free(shared_data);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-void _utc_watchface_complication_provider_data_is_valid_p_checker(
- const char *provider_id, const char *req_appid,
- watchface_complication_type_e type, const bundle *context,
- bundle *shared_data, void *user_data) {
-
- bool is_valid;
- char *user_data_char = (char *)user_data;
-
- if (type == WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT) {
- watchface_complication_provider_data_set_short_text(
- shared_data, "short_text");
- watchface_complication_provider_data_is_valid(shared_data, &is_valid);
-
- assert_eq_with_exit_no_returnval(is_valid, true);
- assert_eq_with_exit_no_returnval(user_data_char, __check_user_data);
- normal_exit_no_returnval(0);
- }
-}
-
-void _utc_watchface_complication_provider_data_is_valid_n1_checker(
- const char *provider_id, const char *req_appid,
- watchface_complication_type_e type, const bundle *context,
- bundle *shared_data, void *user_data) {
-
- bool is_valid;
-
- if (type == WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT) {
- watchface_complication_provider_data_set_long_text(
- shared_data, "long_text");
- watchface_complication_provider_data_is_valid(shared_data, &is_valid);
-
- assert_eq_with_exit_no_returnval(is_valid, false);
- normal_exit_no_returnval(0);
- }
-}
-
-void _utc_watchface_complication_provider_data_is_valid_n2_checker(
- const char *provider_id, const char *req_appid,
- watchface_complication_type_e type, const bundle *context,
- bundle *shared_data, void *user_data) {
- int ret;
- bool is_valid;
- bundle *data = bundle_create();
-
- ret = watchface_complication_provider_data_is_valid(data, &is_valid);
-
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
- normal_exit_no_returnval(0);
-}
-
-
-/**
- * @testcase utc_watchface_complication_provider_data_is_valid_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_provider_data_is_valid()
- */
-int utc_watchface_complication_provider_data_is_valid_p(void)
-{
- int ret;
-
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, _utc_watchface_complication_provider_data_is_valid_p_checker, __check_user_data);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- __run_app(COMPLICATION_TEST_APP, "COMP_TYPE", "SHORT_TEXT");
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_is_valid_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_data_is_valid()
- */
-int utc_watchface_complication_provider_data_is_valid_n1(void)
-{
- int ret;
-
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, _utc_watchface_complication_provider_data_is_valid_n1_checker, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- __run_app(COMPLICATION_TEST_APP, "COMP_TYPE", "SHORT_TEXT");
-
- return 0;
-}
-
-
-/**
- * @testcase utc_watchface_complication_provider_data_is_valid_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_data_is_valid()
- */
-int utc_watchface_complication_provider_data_is_valid_n2(void)
-{
- int ret;
-
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, _utc_watchface_complication_provider_data_is_valid_n2_checker, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- __run_app(COMPLICATION_TEST_APP, "COMP_TYPE", "SHORT_TEXT");
-
- return 0;
-
-}
-
-void __utc_watchface_complication_provider_event_get_type_p_checker(void)
-{
- watchface_complication_event_type_e event_type = WATCHFACE_COMPLICATION_EVENT_NONE;
- watchface_complication_provider_event_get_type(__test_control, &event_type);
-
- assert_eq_with_exit_no_returnval(event_type, WATCHFACE_COMPLICATION_EVENT_TAP);
- normal_exit_no_returnval(0);
-
-}
-
-/**
- * @testcase utc_watchface_complication_provider_event_get_type_p
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_event_get_type()
- */
-int utc_watchface_complication_provider_event_get_type_p(void)
-{
- __event_cmd = EVENT_GET_EVENT_TYPE_TEST_VAL;
- __run_app(COMPLICATION_TEST_APP, "EVENT_TEST", EVENT_GET_EVENT_TYPE_TEST_VAL);
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_event_get_type_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_event_get_type()
- */
-int utc_watchface_complication_provider_event_get_type_n1(void)
-{
- int ret;
- watchface_complication_event_type_e event_type;
-
- ret = watchface_complication_provider_event_get_type(NULL, &event_type);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-void __utc_watchface_complication_provider_event_get_provider_id_p_checker(void)
-{
- int ret;
- char *provider_id = NULL;
-
- ret = watchface_complication_provider_event_get_provider_id(__test_control, &provider_id);
-
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- free(provider_id);
- normal_exit_no_returnval(0);
-
-}
-
-/**
- * @testcase utc_watchface_complication_provider_event_get_provider_id_p
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_event_get_provider_id()
- */
-int utc_watchface_complication_provider_event_get_provider_id_p(void)
-{
- __event_cmd = EVENT_GET_PROVIDER_ID_TEST_VAL;
- __run_app(COMPLICATION_TEST_APP, "EVENT_TEST", EVENT_GET_PROVIDER_ID_TEST_VAL);
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_event_get_provider_id_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_event_get_provider_id()
- */
-int utc_watchface_complication_provider_event_get_provider_id_n1(void)
-{
- int ret;
- char *provider_id = NULL;
-
- ret = watchface_complication_provider_event_get_provider_id(NULL, &provider_id);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-void __utc_watchface_complication_provider_event_get_complication_type_p_checker(void)
-{
- int ret;
- watchface_complication_type_e type;
-
- ret = watchface_complication_provider_event_get_complication_type(__test_control, &type);
-
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- normal_exit_no_returnval(0);
-
-}
-
-/**
- * @testcase utc_watchface_complication_provider_event_get_complication_type_p
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_event_get_complication_type()
- */
-int utc_watchface_complication_provider_event_get_complication_type_p(void)
-{
- __event_cmd = EVENT_GET_COMP_TYPE_TEST_VAL;
- __run_app(COMPLICATION_TEST_APP, "EVENT_TEST", EVENT_GET_COMP_TYPE_TEST_VAL);
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_event_get_complication_type_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_event_get_complication_type()
- */
-int utc_watchface_complication_provider_event_get_complication_type_n1(void)
-{
- int ret;
- watchface_complication_type_e type;
-
- ret = watchface_complication_provider_event_get_complication_type(NULL, &type);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-void __utc_watchface_complication_provider_event_get_context_p_checker(void)
-{
- int ret;
- watchface_complication_type_e type;
-
- ret = watchface_complication_provider_event_get_complication_type(__test_control, &type);
-
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- normal_exit_no_returnval(0);
-
-}
-
-/**
- * @testcase utc_watchface_complication_provider_event_get_context_p
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_event_get_context()
- */
-int utc_watchface_complication_provider_event_get_context_p(void)
-{
- __event_cmd = EVENT_GET_CONTEXT_TEST_VAL;
- __run_app(COMPLICATION_TEST_APP, "EVENT_TEST", EVENT_GET_CONTEXT_TEST_VAL);
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_event_get_context_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_provider_event_get_context()
- */
-int utc_watchface_complication_provider_event_get_context_n1(void)
-{
- int ret;
- bundle *context = bundle_create();
-
- ret = watchface_complication_provider_event_get_context(NULL, &context);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
- bundle_free(context);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_timeinfo_create_p1
- * @since_tizen 5.5
- * @description Negative test case of watchface_complication_provider_timeinfo_create()
- */
-int utc_watchface_complication_provider_timeinfo_create_p1(void)
-{
- int ret;
- complication_time_info_h info;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
-
- ret = watchface_complication_provider_timeinfo_create(&info);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- watchface_complication_provider_timeinfo_destroy(info);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_timeinfo_create_n1
- * @since_tizen 5.5
- * @description Negative test case of watchface_complication_provider_timeinfo_create()
- */
-int utc_watchface_complication_provider_timeinfo_create_n1(void)
-{
- int ret;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
-
- ret = watchface_complication_provider_timeinfo_create(NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_timeinfo_destroy_p1
- * @since_tizen 5.5
- * @description Negative test case of watchface_complication_provider_timeinfo_destroy()
- */
-int utc_watchface_complication_provider_timeinfo_destroy_p1(void)
-{
- int ret;
- complication_time_info_h info;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
-
- ret = watchface_complication_provider_timeinfo_create(&info);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- ret = watchface_complication_provider_timeinfo_destroy(info);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_timeinfo_destroy_n1
- * @since_tizen 5.5
- * @description Negative test case of watchface_complication_provider_timeinfo_destroy()
- */
-int utc_watchface_complication_provider_timeinfo_destroy_n1(void)
-{
- int ret;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
-
- ret = watchface_complication_provider_timeinfo_destroy(NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_timeinfo_set_timezone_p
- * @since_tizen 5.5
- * @description Positive test case of watchface_complication_provider_timeinfo_set_timezone()
- */
-int utc_watchface_complication_provider_timeinfo_set_timezone_p(void)
-{
- int ret;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
-
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, __update_requested_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- __run_app(COMPLICATION_TEST_APP, "COMP_TYPE", "TIME_ZONE");
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_timeinfo_set_timezone_n1
- * @since_tizen 5.5
- * @description Negative test case of watchface_complication_provider_timeinfo_set_timezone()
- */
-int utc_watchface_complication_provider_timeinfo_set_timezone_n1(void)
-{
- int ret;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
-
- ret = watchface_complication_provider_timeinfo_set_timezone(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_timeinfo_set_timezone_id_p
- * @since_tizen 5.5
- * @description Positive test case of watchface_complication_provider_timeinfo_set_timezone_id()
- */
-int utc_watchface_complication_provider_timeinfo_set_timezone_id_p(void)
-{
- int ret;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
-
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, __update_requested_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- __run_app(COMPLICATION_TEST_APP, "COMP_TYPE", "TIME_ZONE_ID");
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_timeinfo_set_timezone_id_n1
- * @since_tizen 5.5
- * @description Negative test case of watchface_complication_provider_timeinfo_set_timezone_id()
- */
-int utc_watchface_complication_provider_timeinfo_set_timezone_id_n1(void)
-{
- int ret;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
-
- ret = watchface_complication_provider_timeinfo_set_timezone_id(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_timeinfo_set_timezone_country_p
- * @since_tizen 5.5
- * @description Positive test case of watchface_complication_provider_timeinfo_set_timezone_country()
- */
-int utc_watchface_complication_provider_timeinfo_set_timezone_country_p(void)
-{
- int ret;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
-
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, __update_requested_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- __run_app(COMPLICATION_TEST_APP, "COMP_TYPE", "TIME_ZONE_COUNTRY");
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_timeinfo_set_timezone_country_n1
- * @since_tizen 5.5
- * @description Negative test case of watchface_complication_provider_timeinfo_set_timezone_country()
- */
-int utc_watchface_complication_provider_timeinfo_set_timezone_country_n1(void)
-{
- int ret;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
-
- ret = watchface_complication_provider_timeinfo_set_timezone_country(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_timeinfo_set_timezone_city_p
- * @since_tizen 5.5
- * @description Positive test case of watchface_complication_provider_timeinfo_set_timezone_city()
- */
-int utc_watchface_complication_provider_timeinfo_set_timezone_city_p(void)
-{
- int ret;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
-
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, __update_requested_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- __run_app(COMPLICATION_TEST_APP, "COMP_TYPE", "TIME_ZONE_CITY");
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_timeinfo_set_timezone_city_n1
- * @since_tizen 5.5
- * @description Negative test case of watchface_complication_provider_timeinfo_set_timezone_city()
- */
-int utc_watchface_complication_provider_timeinfo_set_timezone_city_n1(void)
-{
- int ret;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
-
- ret = watchface_complication_provider_timeinfo_set_timezone_city(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_timeinfo_p
- * @since_tizen 5.5
- * @description Positive test case of watchface_complication_provider_data_set_timeinfo()
- */
-int utc_watchface_complication_provider_data_set_timeinfo_p(void)
-{
- int ret;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
-
- ret = watchface_complication_provider_add_update_requested_cb(
- PROVIDER_ID, __update_requested_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- __run_app(COMPLICATION_TEST_APP, "COMP_TYPE", "TIME_INFO");
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_provider_data_set_timeinfo_n1
- * @since_tizen 5.5
- * @description Negative test case of watchface_complication_provider_data_set_timeinfo()
- */
-int utc_watchface_complication_provider_data_set_timeinfo_n1(void)
-{
- int ret;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
-
- ret = watchface_complication_provider_data_set_timeinfo(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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 "assert.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <system_info.h>
-
-#include <watchface-complication.h>
-#include "utc-watchface-complication.h"
-
-#define WATCH_APP_FEATURE "http://tizen.org/feature/watch_app"
-#define PROVIDER_ID "org.tizen.watchface_sample_provider/test"
-static char __check_user_data[] = "check_user_data";
-static bool __is_supported = false;
-
-static void __complication_updated_cb(int complication_id,
- const char *provider_id, watchface_complication_type_e type,
- const bundle *data, void *user_data) {
-}
-
-static void __complication_error_cb(
- int complication_id,
- const char *provider_id,
- watchface_complication_type_e type,
- watchface_complication_error_e error,
- void *user_data) {
-}
-
-void utc_watchface_complication_startup(void)
-{
- system_info_get_platform_bool(WATCH_APP_FEATURE, &__is_supported);
-}
-
-void utc_watchface_complication_cleanup(void)
-{
-}
-
-/**
- * @testcase utc_watchface_complication_get_current_provider_id_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_get_current_provider_id()
- */
-int utc_watchface_complication_get_current_provider_id_p(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
- char *cur_provider_id;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_get_current_provider_id(complication, &cur_provider_id);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- watchface_complication_destroy(complication);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_get_current_provider_id_p
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_get_current_provider_id()
- */
-int utc_watchface_complication_get_current_provider_id_n1(void)
-{
- int ret;
- char *cur_provider_id;
-
- ret = watchface_complication_get_current_provider_id(NULL, &cur_provider_id);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_get_current_type_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_get_current_type()
- */
-int utc_watchface_complication_get_current_type_p(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
- watchface_complication_type_e cur_type;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_get_current_type(complication, &cur_type);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- watchface_complication_destroy(complication);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_get_current_type_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_get_current_type()
- */
-int utc_watchface_complication_get_current_type_n1(void)
-{
- int ret;
- watchface_complication_type_e cur_type;
-
- ret = watchface_complication_get_current_type(NULL, &cur_type);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_add_updated_cb_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_add_updated_cb()
- */
-int utc_watchface_complication_add_updated_cb_p(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_add_updated_cb(complication,
- __complication_updated_cb, __complication_error_cb,
- NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- watchface_complication_destroy(complication);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_add_updated_cb_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_add_updated_cb()
- */
-int utc_watchface_complication_add_updated_cb_n1(void)
-{
- int ret;
-
- ret = watchface_complication_add_updated_cb(NULL,
- __complication_updated_cb, __complication_error_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_remove_updated_cb_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_remove_updated_cb()
- */
-int utc_watchface_complication_remove_updated_cb_p(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_add_updated_cb(complication,
- __complication_updated_cb, __complication_error_cb,
- NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_remove_updated_cb(complication,
- __complication_updated_cb);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- watchface_complication_destroy(complication);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_remove_updated_cb_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_remove_updated_cb()
- */
-int utc_watchface_complication_remove_updated_cb_n1(void)
-{
- int ret;
-
- ret = watchface_complication_remove_updated_cb(NULL,
- __complication_updated_cb);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_send_update_request_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_send_update_request()
- */
-int utc_watchface_complication_send_update_request_p(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_send_update_request(complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- watchface_complication_destroy(complication);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_send_update_request_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_send_update_request()
- */
-int utc_watchface_complication_send_update_request_n1(void)
-{
- int ret;
-
- ret = watchface_complication_send_update_request(NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_create_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_create()
- */
-int utc_watchface_complication_create_p(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- watchface_complication_destroy(complication);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_create_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_create()
- */
-int utc_watchface_complication_create_n1(void)
-{
- int ret;
- complication_h complication;
- int comp_id = 1;
-
- ret = watchface_complication_create(comp_id, NULL,
- -1, -1,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_destroy_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_destroy()
- */
-int utc_watchface_complication_destroy_p(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_destroy(complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_destroy_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_destroy()
- */
-int utc_watchface_complication_destroy_n1(void)
-{
- int ret;
-
- ret = watchface_complication_destroy(NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_type_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_data_get_type()
- */
-int utc_watchface_complication_data_get_type_n1(void)
-{
- int ret;
- watchface_complication_type_e type;
-
- ret = watchface_complication_data_get_type(NULL, &type);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-static void __short_text_complication_updated_cb(int complication_id,
- const char *provider_id, watchface_complication_type_e type,
- const bundle *data, void *user_data) {
- char *text;
- int ret;
-
- ret = watchface_complication_data_get_short_text(data, &text);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- normal_exit_no_returnval(ret);
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_short_text_p1
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_data_get_short_text()
- */
-int utc_watchface_complication_data_get_short_text_p1(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_add_updated_cb(complication,
- __short_text_complication_updated_cb,
- __complication_error_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_send_update_request(complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_short_text_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_data_get_short_text()
- */
-int utc_watchface_complication_data_get_short_text_n1(void)
-{
- int ret;
- char *text;
-
- ret = watchface_complication_data_get_short_text(NULL, &text);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-static void __long_text_complication_updated_cb(int complication_id,
- const char *provider_id, watchface_complication_type_e type,
- const bundle *data, void *user_data) {
- char *text;
- int ret;
-
- ret = watchface_complication_data_get_long_text(data, &text);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- normal_exit_no_returnval(ret);
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_long_text_p1
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_data_get_long_text()
- */
-int utc_watchface_complication_data_get_long_text_p1(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_LONG_TEXT,
- WATCHFACE_COMPLICATION_TYPE_LONG_TEXT,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_add_updated_cb(complication,
- __long_text_complication_updated_cb,
- __complication_error_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_send_update_request(complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_long_text_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_data_get_long_text()
- */
-int utc_watchface_complication_data_get_long_text_n1(void)
-{
- int ret;
- char *text;
-
- ret = watchface_complication_data_get_long_text(NULL, &text);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-static void __title_complication_updated_cb(int complication_id,
- const char *provider_id, watchface_complication_type_e type,
- const bundle *data, void *user_data) {
- char *text;
- int ret;
-
- ret = watchface_complication_data_get_title(data, &text);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- normal_exit_no_returnval(ret);
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_title_p1
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_data_get_title()
- */
-int utc_watchface_complication_data_get_title_p1(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_LONG_TEXT,
- WATCHFACE_COMPLICATION_TYPE_LONG_TEXT,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_add_updated_cb(complication,
- __title_complication_updated_cb,
- __complication_error_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_send_update_request(complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_title_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_data_get_title()
- */
-int utc_watchface_complication_data_get_title_n1(void)
-{
- int ret;
- char *text;
-
- ret = watchface_complication_data_get_title(NULL, &text);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-static void __time_complication_updated_cb(int complication_id,
- const char *provider_id, watchface_complication_type_e type,
- const bundle *data, void *user_data) {
- long time_value;
- int ret;
-
- ret = watchface_complication_data_get_timestamp(data, &time_value);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- normal_exit_no_returnval(ret);
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_timestamp_p1
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_data_get_timestamp()
- */
-int utc_watchface_complication_data_get_timestamp_p1(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_TIME,
- WATCHFACE_COMPLICATION_TYPE_TIME,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_add_updated_cb(complication,
- __time_complication_updated_cb,
- __complication_error_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_send_update_request(complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_timestamp_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_data_get_timestamp()
- */
-int utc_watchface_complication_data_get_timestamp_n1(void)
-{
- int ret;
- long timestamp;
-
- ret = watchface_complication_data_get_timestamp(NULL, ×tamp);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-static void __image_complication_updated_cb(int complication_id,
- const char *provider_id, watchface_complication_type_e type,
- const bundle *data, void *user_data) {
- char *text;
- int ret;
-
- ret = watchface_complication_data_get_image_path(data, &text);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- normal_exit_no_returnval(ret);
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_image_path_p1
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_data_get_image_path()
- */
-int utc_watchface_complication_data_get_image_path_p1(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_IMAGE,
- WATCHFACE_COMPLICATION_TYPE_IMAGE,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_add_updated_cb(complication,
- __image_complication_updated_cb,
- __complication_error_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_send_update_request(complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_image_path_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_data_get_image_path()
- */
-int utc_watchface_complication_data_get_image_path_n1(void)
-{
- int ret;
- char *path;
-
- ret = watchface_complication_data_get_image_path(NULL, &path);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-static void __ranged_complication_updated_cb(int complication_id,
- const char *provider_id, watchface_complication_type_e type,
- const bundle *data, void *user_data) {
- int ret;
- double cur_val, min_val, max_val;
-
- ret = watchface_complication_data_get_ranged_value(
- data, &cur_val, &min_val, &max_val);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- normal_exit_no_returnval(ret);
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_ranged_value_p1
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_data_get_ranged_value()
- */
-int utc_watchface_complication_data_get_ranged_value_p1(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_RANGED_VALUE,
- WATCHFACE_COMPLICATION_TYPE_RANGED_VALUE,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_add_updated_cb(complication,
- __ranged_complication_updated_cb,
- __complication_error_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_send_update_request(complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_ranged_value_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_data_get_ranged_value()
- */
-int utc_watchface_complication_data_get_ranged_value_n1(void)
-{
- int ret;
- double cur_val, min_val, max_val;
-
- ret = watchface_complication_data_get_ranged_value(NULL,
- &cur_val, &min_val, &max_val);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-static void __icon_complication_updated_cb(int complication_id,
- const char *provider_id, watchface_complication_type_e type,
- const bundle *data, void *user_data) {
- char *text;
- int ret;
-
- ret = watchface_complication_data_get_icon_path(data, &text);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- normal_exit_no_returnval(ret);
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_icon_path_p1
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_data_get_icon_path()
- */
-int utc_watchface_complication_data_get_icon_path_p1(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_ICON,
- WATCHFACE_COMPLICATION_TYPE_ICON,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_add_updated_cb(complication,
- __icon_complication_updated_cb,
- __complication_error_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_send_update_request(complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_icon_path_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_data_get_icon_path()
- */
-int utc_watchface_complication_data_get_icon_path_n1(void)
-{
- int ret;
- char *text;
-
- ret = watchface_complication_data_get_icon_path(NULL, &text);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-
-static void __extra_complication_updated_cb(int complication_id,
- const char *provider_id, watchface_complication_type_e type,
- const bundle *data, void *user_data) {
- char *text;
- int ret;
- char *user_data_char = (char *)user_data;
-
- ret = watchface_complication_data_get_extra_data(data, &text);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- assert_eq_with_exit_no_returnval(user_data_char, __check_user_data);
- normal_exit_no_returnval(ret);
-}
-
-static void __screen_reader_cb(int complication_id,
- const char *provider_id, watchface_complication_type_e type,
- const bundle *data, void *user_data) {
- char *text;
- int ret;
-
- ret = watchface_complication_data_get_screen_reader_text(data, &text);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- free(text);
- normal_exit_no_returnval(ret);
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_extra_data_p1
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_data_get_extra_data()
- */
-int utc_watchface_complication_data_get_extra_data_p1(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_ICON,
- WATCHFACE_COMPLICATION_TYPE_ICON,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_add_updated_cb(complication,
- __extra_complication_updated_cb,
- __complication_error_cb, __check_user_data);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_send_update_request(complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_extra_data_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_data_get_extra_data()
- */
-int utc_watchface_complication_data_get_extra_data_n1(void)
-{
- int ret;
- char *text;
-
- ret = watchface_complication_data_get_extra_data(NULL, &text);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_allowed_list_create_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_allowed_list_create()
- */
-int utc_watchface_complication_allowed_list_create_p(void)
-{
- int ret;
- complication_allowed_list_h handle;
-
- ret = watchface_complication_allowed_list_create(&handle);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- watchface_complication_allowed_list_destroy(handle);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_allowed_list_create_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_allowed_list_create()
- */
-int utc_watchface_complication_allowed_list_create_n1(void)
-{
- int ret;
-
- ret = watchface_complication_allowed_list_create(NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_allowed_list_destroy_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_allowed_list_destroy()
- */
-int utc_watchface_complication_allowed_list_destroy_p(void)
-{
- int ret;
- complication_allowed_list_h handle;
-
- ret = watchface_complication_allowed_list_create(&handle);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_allowed_list_destroy(handle);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_allowed_list_destroy_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_allowed_list_destroy()
- */
-int utc_watchface_complication_allowed_list_destroy_n1(void)
-{
- int ret;
-
- ret = watchface_complication_allowed_list_destroy(NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_allowed_list_add_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_allowed_list_add()
- */
-int utc_watchface_complication_allowed_list_add_p(void)
-{
- int ret;
- complication_allowed_list_h handle;
-
- ret = watchface_complication_allowed_list_create(&handle);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_allowed_list_add(
- handle, PROVIDER_ID, WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- watchface_complication_allowed_list_destroy(handle);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_allowed_list_add_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_allowed_list_add()
- */
-int utc_watchface_complication_allowed_list_add_n1(void)
-{
- int ret;
-
- ret = watchface_complication_allowed_list_add(
- NULL, PROVIDER_ID, WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_allowed_list_add_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_allowed_list_add()
- */
-int utc_watchface_complication_allowed_list_add_n2(void)
-{
- int ret;
- complication_allowed_list_h handle;
-
- ret = watchface_complication_allowed_list_create(&handle);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_allowed_list_add(
- handle, PROVIDER_ID, WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_allowed_list_add(
- handle, PROVIDER_ID, WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_EXIST_ID);
-
- watchface_complication_allowed_list_destroy(handle);
-
- normal_exit(0);
-}
-
-
-/**
- * @testcase utc_watchface_complication_allowed_list_get_nth_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_allowed_list_get_nth()
- */
-int utc_watchface_complication_allowed_list_get_nth_p(void)
-{
- int ret;
- complication_allowed_list_h handle;
- char *provider_id;
- int types;
-
- ret = watchface_complication_allowed_list_create(&handle);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_allowed_list_add(
- handle, PROVIDER_ID, WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_allowed_list_get_nth(
- handle, 0, &provider_id, &types);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- watchface_complication_allowed_list_destroy(handle);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_allowed_list_get_nth_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_allowed_list_get_nth()
- */
-int utc_watchface_complication_allowed_list_get_nth_n1(void)
-{
- int ret;
- char *provider_id;
- int types;
-
- ret = watchface_complication_allowed_list_get_nth(
- NULL, 0, &provider_id, &types);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_allowed_list_delete_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_allowed_list_delete()
- */
-int utc_watchface_complication_allowed_list_delete_p(void)
-{
- int ret;
- complication_allowed_list_h handle;
-
- ret = watchface_complication_allowed_list_create(&handle);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_allowed_list_add(
- handle, PROVIDER_ID, WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_allowed_list_delete(handle, PROVIDER_ID);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- watchface_complication_allowed_list_destroy(handle);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_allowed_list_delete_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_allowed_list_delete()
- */
-int utc_watchface_complication_allowed_list_delete_n1(void)
-{
- int ret;
- complication_allowed_list_h handle;
-
- ret = watchface_complication_allowed_list_create(&handle);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_allowed_list_add(
- handle, PROVIDER_ID, WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_allowed_list_delete(handle, "wrong_provider_id");
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NO_DATA);
-
- watchface_complication_allowed_list_destroy(handle);
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_allowed_list_delete_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_allowed_list_delete()
- */
-int utc_watchface_complication_allowed_list_delete_n2(void)
-{
- int ret;
-
- ret = watchface_complication_allowed_list_delete(NULL, PROVIDER_ID);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_allowed_list_apply_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_allowed_list_apply()
- */
-int utc_watchface_complication_allowed_list_apply_p(void)
-{
- int ret;
- complication_allowed_list_h handle;
- int comp_id = 1;
- complication_h complication;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_allowed_list_create(&handle);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_allowed_list_add(
- handle, PROVIDER_ID, WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_allowed_list_apply(complication, handle);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- watchface_complication_allowed_list_destroy(handle);
- watchface_complication_destroy(complication);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_allowed_list_apply_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_allowed_list_apply()
- */
-int utc_watchface_complication_allowed_list_apply_n1(void)
-{
- int ret;
-
- ret = watchface_complication_allowed_list_apply(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-
-/**
- * @testcase utc_watchface_complication_allowed_list_clear_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_allowed_list_clear()
- */
-int utc_watchface_complication_allowed_list_clear_p(void)
-{
- int ret;
- complication_allowed_list_h handle;
- int comp_id = 1;
- complication_h complication;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_allowed_list_create(&handle);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_allowed_list_add(
- handle, PROVIDER_ID, WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_allowed_list_apply(complication, handle);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_allowed_list_clear(complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- watchface_complication_allowed_list_destroy(handle);
- watchface_complication_destroy(complication);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_allowed_list_clear_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_allowed_list_clear()
- */
-int utc_watchface_complication_allowed_list_clear_n1(void)
-{
- int ret;
-
- ret = watchface_complication_allowed_list_clear(NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_screen_reader_text_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_data_get_screen_reader_text()
- */
-int utc_watchface_complication_data_get_screen_reader_text_p(void)
-{
- int comp_id = 1;
- int ret;
- complication_h complication;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_ICON,
- WATCHFACE_COMPLICATION_TYPE_ICON,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_add_updated_cb(complication,
- __screen_reader_cb,
- __complication_error_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_send_update_request(complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_screen_reader_text_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_data_get_screen_reader_text()
- */
-int utc_watchface_complication_data_get_screen_reader_text_n1(void)
-{
- int ret;
- char *text;
-
- ret = watchface_complication_data_get_screen_reader_text(NULL, &text);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);;
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_screen_reader_text_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_data_get_screen_reader_text()
- */
-int utc_watchface_complication_data_get_screen_reader_text_n2(void)
-{
- int ret;
- bundle *data;
-
- data = bundle_create();
- ret = watchface_complication_data_get_screen_reader_text(data, NULL);
- bundle_free(data);
-
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_transfer_event_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_complication_transfer_event()
- */
-int utc_watchface_complication_transfer_event_p(void)
-{
- int comp_id = 1;
- int ret;
- complication_h complication;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_ICON,
- WATCHFACE_COMPLICATION_TYPE_ICON,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_add_updated_cb(complication,
- __screen_reader_cb,
- __complication_error_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_transfer_event(complication,
- WATCHFACE_COMPLICATION_EVENT_TAP);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- normal_exit(0);
-}
-
-
-/**
- * @testcase utc_watchface_complication_transfer_event_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_transfer_event()
- */
-int utc_watchface_complication_transfer_event_n1(void)
-{
- int ret;
- ret = watchface_complication_transfer_event(NULL,
- WATCHFACE_COMPLICATION_EVENT_TAP);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_complication_transfer_event_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_complication_transfer_event()
- */
-int utc_watchface_complication_transfer_event_n2(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_ICON,
- WATCHFACE_COMPLICATION_TYPE_ICON,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_transfer_event(complication, 0);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
- normal_exit(0);
-}
-
-
-static void __timeinfo_complication_updated_cb(int complication_id,
- const char *provider_id, watchface_complication_type_e type,
- const bundle *data, void *user_data) {
- complication_time_info_h info;
- int ret;
-
- ret = watchface_complication_data_get_timeinfo(data, &info);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- normal_exit_no_returnval(ret);
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_timeinfo_p
- * @since_tizen 5.5
- * @description Positive test case of watchface_complication_data_get_timeinfo()
- */
-int utc_watchface_complication_data_get_timeinfo_p(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_TIME,
- WATCHFACE_COMPLICATION_TYPE_TIME,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_add_updated_cb(complication,
- __timeinfo_complication_updated_cb,
- __complication_error_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_send_update_request(complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_data_get_timeinfo_n
- * @since_tizen 5.5
- * @description Negative test case of watchface_complication_data_get_timeinfo()
- */
-int utc_watchface_complication_data_get_timeinfo_n(void)
-{
- int ret;
- char *cur_provider_id;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
- ret = watchface_complication_data_get_timeinfo(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-static void __timezone_complication_updated_cb(int complication_id,
- const char *provider_id, watchface_complication_type_e type,
- const bundle *data, void *user_data) {
- complication_time_info_h info;
- int ret;
- char *timezone;
-
- watchface_complication_data_get_timeinfo(data, &info);
- ret = watchface_complication_timeinfo_get_timezone(info, &timezone);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- assert_eq_with_exit_no_returnval(strcmp("UTC+9", timezone), 0);
- free(timezone);
- normal_exit_no_returnval(ret);
-}
-
-/**
- * @testcase utc_watchface_complication_timeinfo_get_timezone_p
- * @since_tizen 5.5
- * @description Positive test case of watchface_complication_timeinfo_get_timezone()
- */
-int utc_watchface_complication_timeinfo_get_timezone_p(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_TIME,
- WATCHFACE_COMPLICATION_TYPE_TIME,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_add_updated_cb(complication,
- __timezone_complication_updated_cb,
- __complication_error_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_send_update_request(complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_timeinfo_get_timezone_n
- * @since_tizen 5.5
- * @description Negative test case of watchface_complication_timeinfo_get_timezone()
- */
-int utc_watchface_complication_timeinfo_get_timezone_n(void)
-{
- int ret;
- char *cur_provider_id;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
- ret = watchface_complication_timeinfo_get_timezone(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-static void __timezone_id_complication_updated_cb(int complication_id,
- const char *provider_id, watchface_complication_type_e type,
- const bundle *data, void *user_data) {
- complication_time_info_h info;
- char *timezone_id;
- int ret;
-
- watchface_complication_data_get_timeinfo(data, &info);
- ret = watchface_complication_timeinfo_get_timezone_id(info, &timezone_id);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- assert_eq_with_exit_no_returnval(strcmp("Asia/Seoul", timezone_id), 0);
- free(timezone_id);
- normal_exit_no_returnval(ret);
-}
-
-/**
- * @testcase utc_watchface_complication_timeinfo_get_timezone_id_p
- * @since_tizen 5.5
- * @description Positive test case of watchface_complication_timeinfo_get_timezone_id()
- */
-int utc_watchface_complication_timeinfo_get_timezone_id_p(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_TIME,
- WATCHFACE_COMPLICATION_TYPE_TIME,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_add_updated_cb(complication,
- __timezone_id_complication_updated_cb,
- __complication_error_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_send_update_request(complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_timeinfo_get_timezone_id_n
- * @since_tizen 5.5
- * @description Negative test case of watchface_complication_timeinfo_get_timezone_id()
- */
-int utc_watchface_complication_timeinfo_get_timezone_id_n(void)
-{
- int ret;
- char *cur_provider_id;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
- ret = watchface_complication_timeinfo_get_timezone_id(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-static void __timezone_country_complication_updated_cb(int complication_id,
- const char *provider_id, watchface_complication_type_e type,
- const bundle *data, void *user_data) {
- complication_time_info_h info;
- char *country;
- int ret;
-
- watchface_complication_data_get_timeinfo(data, &info);
- ret = watchface_complication_timeinfo_get_timezone_country(info, &country);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- assert_eq_with_exit_no_returnval(strcmp("Korea", country), 0);
- free(country);
- normal_exit_no_returnval(ret);
-}
-
-/**
- * @testcase utc_watchface_complication_timeinfo_get_timezone_country_p
- * @since_tizen 5.5
- * @description Positive test case of watchface_complication_timeinfo_get_timezone_country()
- */
-int utc_watchface_complication_timeinfo_get_timezone_country_p(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_TIME,
- WATCHFACE_COMPLICATION_TYPE_TIME,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_add_updated_cb(complication,
- __timezone_country_complication_updated_cb,
- __complication_error_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_send_update_request(complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_timeinfo_get_timezone_country_n
- * @since_tizen 5.5
- * @description Negative test case of watchface_complication_timeinfo_get_timezone_country()
- */
-int utc_watchface_complication_timeinfo_get_timezone_country_n(void)
-{
- int ret;
- char *cur_provider_id;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
- ret = watchface_complication_timeinfo_get_timezone_country(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-static void __timezone_city_complication_updated_cb(int complication_id,
- const char *provider_id, watchface_complication_type_e type,
- const bundle *data, void *user_data) {
- complication_time_info_h info;
- char *city;
- int ret;
-
- watchface_complication_data_get_timeinfo(data, &info);
- ret = watchface_complication_timeinfo_get_timezone_city(info, &city);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- assert_eq_with_exit_no_returnval(strcmp("Seoul", city), 0);
- free(city);
- normal_exit_no_returnval(ret);
-}
-
-/**
- * @testcase utc_watchface_complication_timeinfo_get_timezone_city_p
- * @since_tizen 5.5
- * @description Positive test case of watchface_complication_timeinfo_get_timezone_city()
- */
-int utc_watchface_complication_timeinfo_get_timezone_city_p(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_TIME,
- WATCHFACE_COMPLICATION_TYPE_TIME,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_add_updated_cb(complication,
- __timezone_city_complication_updated_cb,
- __complication_error_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_send_update_request(complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_timeinfo_get_timezone_city_n
- * @since_tizen 5.5
- * @description Negative test case of watchface_complication_timeinfo_get_timezone_city()
- */
-int utc_watchface_complication_timeinfo_get_timezone_city_n(void)
-{
- int ret;
- char *cur_provider_id;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
- ret = watchface_complication_timeinfo_get_timezone_city(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-
-static void __timestamp_complication_updated_cb(int complication_id,
- const char *provider_id, watchface_complication_type_e type,
- const bundle *data, void *user_data) {
- complication_time_info_h info;
- time_t timestamp;
- int ret;
-
- watchface_complication_data_get_timeinfo(data, &info);
- ret = watchface_complication_timeinfo_get_timestamp(info, ×tamp);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- normal_exit_no_returnval(ret);
-}
-
-/**
- * @testcase utc_watchface_complication_timeinfo_get_timestamp_p
- * @since_tizen 5.5
- * @description Positive test case of watchface_complication_timeinfo_get_timestamp()
- */
-int utc_watchface_complication_timeinfo_get_timestamp_p(void)
-{
- int ret;
- int comp_id = 1;
- complication_h complication;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
- ret = watchface_complication_create(comp_id, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_TIME,
- WATCHFACE_COMPLICATION_TYPE_TIME,
- WATCHFACE_COMPLICATION_EVENT_NONE, &complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_add_updated_cb(complication,
- __timestamp_complication_updated_cb,
- __complication_error_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_send_update_request(complication);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_complication_timeinfo_get_timestamp_n
- * @since_tizen 5.5
- * @description Negative test case of watchface_complication_timeinfo_get_timestamp()
- */
-int utc_watchface_complication_timeinfo_get_timestamp_n(void)
-{
- int ret;
- char *cur_provider_id;
-
- if (!__is_supported)
- normal_exit(WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED);
- ret = watchface_complication_timeinfo_get_timestamp(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
\ No newline at end of file
+++ /dev/null
-#ifndef __UTC_WATCHFACE_COMPLICATION_H__
-#define __UTC_WATCHFACE_COMPLICATION_H__
-#include <stdbool.h>
-#include <glib.h>
-#include <service_app.h>
-#include <dlog.h>
-#include <app_control.h>
-
-#define SETUP_IS_EDITING_TEST_VAL "SETUP_IS_EDITING_TEST_VAL"
-#define SETUP_REPLY_TO_EDITOR_TEST_VAL "SETUP_REPLY_TO_EDITOR_TEST_VAL"
-#define SETUP_GET_CONTEXT_TEST_VAL "SETUP_GET_CONTEXT_VAL"
-
-#define EVENT_GET_PROVIDER_ID_TEST_VAL "EVENT_GET_PROVIDER_ID_TEST_VAL"
-#define EVENT_GET_COMP_TYPE_TEST_VAL "EVENT_GET_COMP_TYPE_TEST_VAL"
-#define EVENT_GET_CONTEXT_TEST_VAL "EVENT_GET_CONTEXT_TEST_VAL"
-#define EVENT_GET_EVENT_TYPE_TEST_VAL "EVENT_GET_EVENT_TYPE_TEST_VAL"
-
-
-int __result;
-app_control_h __test_control;
-char *__event_cmd;
-
-static gboolean __tc_exit(gpointer data) {
- service_app_exit();
- return G_SOURCE_REMOVE;
-}
-
-#define assert_with_exit(exp) do { \
- if (!(exp)) { \
- fprintf(stderr, \
- "Assert fail in %s:%d\n", __FILE__, __LINE__); \
- fprintf(stderr, \
- "Following expression is not true:\n" \
- "%s\n", #exp); \
- dlog_print(DLOG_INFO, "NativeTCT", "Assert fail in %s:%d\n", __FILE__, __LINE__); \
- __result = 1; \
- g_idle_add(__tc_exit, NULL); \
- return 1; \
- } \
-} while (0)
-
-#define assert_with_exit_no_returnval(exp) do { \
- if (!(exp)) { \
- fprintf(stderr, \
- "Assert fail in %s:%d\n", __FILE__, __LINE__); \
- fprintf(stderr, \
- "Following expression is not true:\n" \
- "%s\n", #exp); \
- dlog_print(DLOG_INFO, "NativeTCT", "Assert fail in %s:%d\n", __FILE__, __LINE__); \
- __result = 1; \
- g_idle_add(__tc_exit, NULL); \
- return; \
- } \
-} while (0)
-
-
-#define assert_eq_with_exit(var, ref) do { \
- if (var != ref) { \
- fprintf(stderr, \
- "Assert fail in %s:%d\n", __FILE__, __LINE__); \
- fprintf(stderr, \
- "Values \"%s\" and \"%s\" are not equal:\n" \
- "%s == %d, %s == %d\n", \
- #var, #ref, #var, (int)var, #ref, (int)ref); \
- dlog_print(DLOG_INFO, "NativeTCT", "Assert fail in %s:%d\n", __FILE__, __LINE__); \
- __result = 1; \
- g_idle_add(__tc_exit, NULL); \
- return 1; \
- } \
-} while (0)
-
-#define assert_eq_with_free(var, ref, var2) do { \
- if (var != ref) { \
- fprintf(stderr, \
- "Assert fail in %s:%d\n", __FILE__, __LINE__); \
- fprintf(stderr, \
- "Values \"%s\" and \"%s\" are not equal:\n" \
- "%s == %d, %s == %d\n", \
- #var, #ref, #var, (int)var, #ref, (int)ref); \
- free(var2); \
- dlog_print(DLOG_INFO, "NativeTCT", "Assert fail in %s:%d\n", __FILE__, __LINE__); \
- __result = 1; \
- g_idle_add(__tc_exit, NULL); \
- return 1; \
- } \
-} while (0)
-
-
-#define assert_neq_with_exit(var, ref) do { \
- if (var == ref) { \
- fprintf(stderr, \
- "Assert fail in %s:%d\n", __FILE__, __LINE__); \
- fprintf(stderr, \
- "Values \"%s\" and \"%s\" are equal:\n" \
- "%s == %s == %d\n", \
- #var, #ref, #var, #ref, (int)ref); \
- dlog_print(DLOG_INFO, "NativeTCT", "Assert fail in %s:%d\n", __FILE__, __LINE__); \
- __result = 1; \
- g_idle_add(__tc_exit, NULL); \
- return 1; \
- } \
-} while (0)
-
-#define assert_neq_with_exit_no_returnval(var, ref) do { \
- if (var == ref) { \
- fprintf(stderr, \
- "Assert fail in %s:%d\n", __FILE__, __LINE__); \
- fprintf(stderr, \
- "Values \"%s\" and \"%s\" are equal:\n" \
- "%s == %s == %d\n", \
- #var, #ref, #var, #ref, (int)ref); \
- dlog_print(DLOG_INFO, "NativeTCT", "Assert fail in %s:%d\n", __FILE__, __LINE__); \
- __result = 1; \
- g_idle_add(__tc_exit, NULL); \
- return; \
- } \
-} while (0)
-
-#define assert_neq_without_exit(var, ref) do { \
- if (var == ref) { \
- fprintf(stderr, \
- "Assert fail in %s:%d\n", __FILE__, __LINE__); \
- fprintf(stderr, \
- "Values \"%s\" and \"%s\" are equal:\n" \
- "%s == %s == %d\n", \
- #var, #ref, #var, #ref, (int)ref); \
- dlog_print(DLOG_INFO, "NativeTCT", "Assert fail in %s:%d\n", __FILE__, __LINE__); \
- __result = 1; \
- return 1; \
- } \
-} while (0)
-
-#define assert_eq_with_exit_no_returnval(var, ref) do { \
- if (var != ref) { \
- fprintf(stderr, \
- "Assert fail in %s:%d\n", __FILE__, __LINE__); \
- fprintf(stderr, \
- "Values \"%s\" and \"%s\" are not equal:\n" \
- "%s == %d, %s == %d\n", \
- #var, #ref, #var, (int)var, #ref, (int)ref); \
- dlog_print(DLOG_INFO, "NativeTCT", "Assert fail in %s:%d ", __FILE__, __LINE__); \
- __result = 1; \
- g_idle_add(__tc_exit, NULL); \
- return; \
- } \
-} while (0)
-
-#define normal_exit(result) do { \
- __result = result; \
- g_idle_add(__tc_exit, NULL); \
- return 0; \
-} while (0)
-
-#define normal_exit_no_returnval(result) do { \
- __result = result; \
- g_idle_add(__tc_exit, NULL); \
- return; \
-} while (0)
-
-#endif // __UTC_WATCHFACE_COMPLICATION_H__
+++ /dev/null
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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 "assert.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <Ecore.h>
-
-#include <system_info.h>
-#include <app_manager.h>
-#include <app_control.h>
-
-#include <watchface-editable.h>
-#include "utc-watchface-complication.h"
-
-#define PROVIDER_ID "org.tizen.watchface_sample_provider/test"
-#define EDITOR_ID "org.tizen.watchface_sample_editor"
-#define MAX_COUNTER 5
-#define GEO_X 100
-#define GEO_Y 100
-#define GEO_W 100
-#define GEO_H 100
-static char __check_user_data[] = "check_user_data";
-
-static void _run_editor_app() {
- static app_control_h app_control;
- bool is_running = false;
- int counter = MAX_COUNTER;
- int ret;
-
- ret = app_control_create(&app_control);
- ret = app_control_set_app_id(app_control, EDITOR_ID);
- app_control_add_extra_data(app_control, "SENDER_ID", "org.tizen.watchface-complication-native-utc");
- do {
- ret = app_control_send_launch_request(app_control, NULL, NULL);
- if (ret != APP_CONTROL_ERROR_NONE)
- sleep(1);
- app_manager_is_running(EDITOR_ID, &is_running);
- } while (--counter > 0 && !is_running);
- sleep(1);
-}
-
-static void _edit_ready_cb(watchface_editable_container_h ed_con_h,
- const char *editor_appid,
- void *user_data) {
-}
-
-void utc_watchface_editable_startup(void)
-{
-}
-
-void utc_watchface_editable_cleanup(void)
-{
-}
-
-/**
- * @testcase utc_watchface_editable_candidates_list_create_n
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_candidates_list_create()
- */
-int utc_watchface_editable_candidates_list_create_n(void)
-{
- int ret;
-
- ret = watchface_editable_candidates_list_create(NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_candidates_list_create_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_candidates_list_create()
- */
-int utc_watchface_editable_candidates_list_create_p(void)
-{
- int ret;
- complication_candidates_list_h list;
-
- ret = watchface_editable_candidates_list_create(&list);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- assert(list);
-
- watchface_editable_candidates_list_destroy(list);
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_candidates_list_add_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_candidates_list_add()
- */
-int utc_watchface_editable_candidates_list_add_n1(void)
-{
- int ret;
- bundle *candidate;
-
- candidate = bundle_create();
- assert(candidate);
-
- bundle_add_str(candidate, "COLOR", "RED");
-
- ret = watchface_editable_candidates_list_add(NULL, candidate);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- bundle_free(candidate);
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_candidates_list_add_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_candidates_list_add()
- */
-int utc_watchface_editable_candidates_list_add_n2(void)
-{
- int ret;
- complication_candidates_list_h list;
-
- ret = watchface_editable_candidates_list_create(&list);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
-
- ret = watchface_editable_candidates_list_add(list, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- watchface_editable_candidates_list_destroy(list);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_candidates_list_add_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_candidates_list_add()
- */
-int utc_watchface_editable_candidates_list_add_p(void)
-{
- int ret;
- complication_candidates_list_h list;
- bundle *candidate;
-
- ret = watchface_editable_candidates_list_create(&list);
- assert(list);
-
- candidate = bundle_create();
- assert(candidate);
- bundle_add_str(candidate, "COLOR", "RED");
-
- ret = watchface_editable_candidates_list_add(list, candidate);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- watchface_editable_candidates_list_destroy(list);
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_candidates_list_destroy_n
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_candidates_list_destroy()
- */
-int utc_watchface_editable_candidates_list_destroy_n(void)
-{
- int ret;
-
- ret = watchface_editable_candidates_list_destroy(NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_candidates_list_destroy_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_candidates_list_destroy()
- */
-int utc_watchface_editable_candidates_list_destroy_p(void)
-{
- int ret;
- complication_candidates_list_h list;
-
- ret = watchface_editable_candidates_list_create(&list);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- assert(list);
-
- watchface_editable_candidates_list_destroy(list);
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_add_design_element_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_add_design_element()
- */
-int utc_watchface_editable_add_design_element_n1(void)
-{
- int ret;
- complication_candidates_list_h list;
- bundle *candidate;
- watchface_editable_highlight_h highlight;
-
- watchface_editable_candidates_list_create(&list);
-
- candidate = bundle_create();
- bundle_add_str(candidate, "COLOR", "RED");
- ret = watchface_editable_candidates_list_add(list, candidate);
-
- ret = watchface_editable_highlight_create(&highlight,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_set_geometry(highlight,
- 100, 100, 30, 30);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_add_design_element(NULL, 0, 0, list, highlight, "Dummy");
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_add_design_element_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_add_design_element()
- */
-int utc_watchface_editable_add_design_element_n2(void)
-{
- int ret;
- complication_candidates_list_h list;
- watchface_editable_highlight_h highlight;
-
- watchface_editable_candidates_list_create(&list);
-
- ret = watchface_editable_highlight_create(&highlight,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_set_geometry(highlight,
- 100, 100, 30, 30);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_add_design_element(NULL, 0, 0, list, highlight, "Dummy");
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_add_design_element_n3
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_add_design_element()
- */
-int utc_watchface_editable_add_design_element_n3(void)
-{
- int ret;
- complication_candidates_list_h list;
- watchface_editable_highlight_h highlight;
- bundle *candidate;
-
- watchface_editable_candidates_list_create(&list);
-
- candidate = bundle_create();
- bundle_add_str(candidate, "COLOR", "RED");
- ret = watchface_editable_candidates_list_add(list, candidate);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_create(&highlight,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_set_geometry(highlight,
- 100, 100, 30, 30);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_add_design_element(NULL, 0, 0, list, highlight, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-static void _update_requested_cb(const watchface_editable_h handle,
- int selected_idx,
- const watchface_editable_edit_state_e state,
- void *user_data)
-{
- normal_exit_no_returnval(0);
-}
-
-static int _request_edit_with_design_elements(
- watchface_editable_container_h ed_con_h,
- watchface_editable_update_requested_cb update_cb) {
- int ret;
- complication_candidates_list_h list;
- bundle *candidate1;
- bundle *candidate2;
- watchface_editable_highlight_h highlight;
-
- ret = watchface_editable_candidates_list_create(&list);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- candidate1 = bundle_create();
- assert_with_exit(candidate1);
- bundle_add_str(candidate1, "COLOR", "RED");
- ret = watchface_editable_candidates_list_add(list, candidate1);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- candidate2 = bundle_create();
- assert_with_exit(candidate2);
- bundle_add_str(candidate2, "COLOR", "BLUE");
- ret = watchface_editable_candidates_list_add(list, candidate2);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_create(&highlight,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_set_geometry(highlight,
- GEO_X, GEO_Y, GEO_W, GEO_H);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_add_design_element(ed_con_h, 0, 0, list,
- highlight, "Color");
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_request_edit(ed_con_h, update_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- bundle_free(candidate1);
- bundle_free(candidate2);
- watchface_editable_candidates_list_destroy(list);
-
- return ret;
-}
-
-static void _design_element_on_edit_ready(
- watchface_editable_container_h ed_con_h,
- const char *editor_appid,
- void *user_data) {
- int ret;
- ret = _request_edit_with_design_elements(ed_con_h, _update_requested_cb);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-}
-
-/**
- * @testcase utc_watchface_editable_add_design_element_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_add_design_element()
- */
-int utc_watchface_editable_add_design_element_p(void)
-{
- int ret;
-
- ret = watchface_editable_add_edit_ready_cb(_design_element_on_edit_ready, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- _run_editor_app();
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_editable_add_complication_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_add_complication()
- */
-int utc_watchface_editable_add_complication_n1(void)
-{
- int ret;
- int editable_id = 0;
- complication_h comp;
- watchface_editable_highlight_h highlight;
-
- ret = watchface_editable_highlight_create(&highlight,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_set_geometry(highlight,
- 100, 100, 30, 30);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_create(0, "org.tizen.sample_provider",
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_EVENT_TAP, &comp);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_add_complication(NULL, editable_id, comp, highlight);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_add_complication_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_add_complication()
- */
-int utc_watchface_editable_add_complication_n2(void)
-{
- int ret;
- int editable_id = 0;
- watchface_editable_highlight_h highlight;
-
- //_run_editor_app();
-
- ret = watchface_editable_highlight_create(&highlight,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_set_geometry(highlight,
- 100, 100, 30, 30);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_add_complication(NULL, editable_id, NULL, highlight);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-static void _request_edit_with_complication(
- const watchface_editable_h handle,
- int selected_idx,
- const watchface_editable_edit_state_e state,
- void *user_data)
-{
- char *user_data_char = (char *)user_data;
-
- assert_eq_with_exit_no_returnval(user_data_char, __check_user_data);
- normal_exit_no_returnval(0);
-}
-
-static void _add_complication_on_edit_ready(watchface_editable_container_h ed_con_h,
- const char *editor_appid,
- void *user_data) {
- int ret;
- int editable_id = 1;
- complication_h comp;
- watchface_editable_highlight_h highlight;
- char *user_data_char = (char *)user_data;
-
- assert_eq_with_exit_no_returnval(user_data_char, __check_user_data);
-
- ret = watchface_editable_highlight_create(&highlight,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_set_geometry(highlight,
- 100, 100, 30, 30);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_create(1, PROVIDER_ID,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_EVENT_TAP, &comp);
-
- ret = watchface_editable_add_complication(ed_con_h, editable_id, comp, highlight);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_request_edit(ed_con_h, _request_edit_with_complication, __check_user_data);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-}
-
-/**
- * @testcase utc_watchface_editable_add_complication_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_add_complication()
- */
-int utc_watchface_editable_add_complication_p(void)
-{
- int ret;
-
- ret = watchface_editable_add_edit_ready_cb(_add_complication_on_edit_ready, __check_user_data);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- _run_editor_app();
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_editable_request_edit_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_request_edit()
- */
-int utc_watchface_editable_request_edit_n1(void)
-{
- int ret;
-
- ret = watchface_editable_request_edit(NULL, _update_requested_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_request_edit_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_request_edit()
- */
-int utc_watchface_editable_request_edit_n2(void)
-{
- int ret;
-
- ret = watchface_editable_request_edit(NULL, NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-
-static void _request_edit_on_edit_ready(watchface_editable_container_h ed_con_h,
- const char *editor_appid,
- void *user_data) {
- int ret;
- complication_h comp;
- watchface_editable_highlight_h highlight;
-
- ret = watchface_editable_highlight_create(&highlight,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_set_geometry(highlight,
- 100, 100, 30, 30);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_complication_create(0, "org.tizen.sample_provider",
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
- WATCHFACE_COMPLICATION_EVENT_TAP, &comp);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_add_complication(ed_con_h, 0, comp, highlight);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_request_edit(ed_con_h, _update_requested_cb, NULL);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- normal_exit_no_returnval(ret);
-}
-
-/**
- * @testcase utc_watchface_editable_request_edit_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_request_edit()
- */
-int utc_watchface_editable_request_edit_p(void)
-{
- int ret;
-
- ret = watchface_editable_add_edit_ready_cb(_request_edit_on_edit_ready, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- _run_editor_app();
-
- return 0;
-}
-/**
- * @testcase utc_watchface_editable_add_edit_ready_cb_n
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_add_edit_ready_cb()
- */
-int utc_watchface_editable_add_edit_ready_cb_n(void)
-{
- int ret;
-
- ret = watchface_editable_add_edit_ready_cb(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_add_edit_ready_cb_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_add_edit_ready_cb()
- */
-int utc_watchface_editable_add_edit_ready_cb_p(void)
-{
- int ret;
-
- ret = watchface_editable_add_edit_ready_cb(_edit_ready_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_remove_edit_ready_cb(_edit_ready_cb);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_remove_edit_ready_cb_n
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_remove_edit_ready_cb()
- */
-int utc_watchface_editable_remove_edit_ready_cb_n(void)
-{
- int ret;
-
- ret = watchface_editable_remove_edit_ready_cb(NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_remove_edit_ready_cb_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_remove_edit_ready_cb()
- */
-int utc_watchface_editable_remove_edit_ready_cb_p(void)
-{
- int ret;
-
- ret = watchface_editable_add_edit_ready_cb(_edit_ready_cb, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_remove_edit_ready_cb(_edit_ready_cb);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_get_editable_name_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_get_editable_name()
- */
-int utc_watchface_editable_get_editable_name_n1(void)
-{
- int ret;
- char *editable_name;
-
- ret = watchface_editable_get_editable_name(NULL, &editable_name);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_get_editable_name_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_get_editable_name()
- */
-int utc_watchface_editable_get_editable_name_n2(void)
-{
- int ret;
-
- ret = watchface_editable_get_editable_name(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-static void _editable_name_update_requested_cb(const watchface_editable_h handle,
- int selected_idx,
- const watchface_editable_edit_state_e state,
- void *user_data)
-{
- int ret;
- char *editable_name = NULL;
-
- ret = watchface_editable_get_editable_name(handle, &editable_name);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- assert_neq_with_exit_no_returnval(editable_name, NULL);
- free(editable_name);
-
- normal_exit_no_returnval(ret);
-}
-
-static void _editable_name_on_edit_ready(
- watchface_editable_container_h ed_con_h,
- const char *editor_appid,
- void *user_data) {
- int ret;
- ret = _request_edit_with_design_elements(
- ed_con_h, _editable_name_update_requested_cb);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-}
-
-/**
- * @testcase utc_watchface_editable_get_editable_name_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_get_editable_name()
- */
-int utc_watchface_editable_get_editable_name_p(void)
-{
- int ret;
-
- ret = watchface_editable_add_edit_ready_cb(_editable_name_on_edit_ready, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- _run_editor_app();
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_editable_set_editable_name_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_set_editable_name()
- */
-int utc_watchface_editable_set_editable_name_n1(void)
-{
- int ret;
-
- ret = watchface_editable_set_editable_name(NULL, "Editor");
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_set_editable_name_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_set_editable_name()
- */
-int utc_watchface_editable_set_editable_name_n2(void)
-{
- int ret;
-
- ret = watchface_editable_set_editable_name(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-
-static void _editable_set_name_update_requested_cb(const watchface_editable_h handle,
- int selected_idx,
- const watchface_editable_edit_state_e state,
- void *user_data)
-{
- int ret;
-
- ret = watchface_editable_set_editable_name(handle, "TEST");
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- normal_exit_no_returnval(ret);
-}
-
-static void _editable_set_name_on_edit_ready(
- watchface_editable_container_h ed_con_h,
- const char *editor_appid,
- void *user_data) {
- int ret;
- ret = _request_edit_with_design_elements(
- ed_con_h, _editable_set_name_update_requested_cb);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-}
-
-/**
- * @testcase utc_watchface_editable_set_editable_name_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_set_editable_name()
- */
-int utc_watchface_editable_set_editable_name_p(void)
-{
- int ret;
-
- ret = watchface_editable_add_edit_ready_cb(_editable_set_name_on_edit_ready, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- _run_editor_app();
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_editable_get_nth_data_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_get_nth_data()
- */
-int utc_watchface_editable_get_nth_data_n1(void)
-{
- int ret;
- bundle *data = NULL;
-
- ret = watchface_editable_get_nth_data(NULL, 0, &data);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_get_nth_data_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_get_nth_data()
- */
-int utc_watchface_editable_get_nth_data_n2(void)
-{
- int ret;
-
- //_run_editor_app();
-
- ret = watchface_editable_get_nth_data(NULL, 0, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-
-static void _get_nth_update_requested_cb(const watchface_editable_h handle,
- int selected_idx,
- const watchface_editable_edit_state_e state,
- void *user_data)
-{
- int ret;
- int n = 0;
- bundle *data = NULL;
-
- ret = watchface_editable_get_nth_data(handle, n, &data);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- assert_neq_with_exit_no_returnval(data, NULL);
- bundle_free(data);
-
- normal_exit_no_returnval(ret);
-}
-
-static void _get_nth_on_edit_ready(
- watchface_editable_container_h ed_con_h,
- const char *editor_appid,
- void *user_data) {
- int ret;
- ret = _request_edit_with_design_elements(
- ed_con_h, _get_nth_update_requested_cb);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-}
-
-/**
- * @testcase utc_watchface_editable_get_nth_data_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_get_nth_data()
- */
-int utc_watchface_editable_get_nth_data_p(void)
-{
- int ret;
-
- ret = watchface_editable_add_edit_ready_cb(_get_nth_on_edit_ready, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- _run_editor_app();
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_editable_get_current_data_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_get_current_data()
- */
-int utc_watchface_editable_get_current_data_n1(void)
-{
- int ret;
- bundle *data = NULL;
-
- ret = watchface_editable_get_current_data(NULL, &data);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_get_current_data_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_get_current_data()
- */
-int utc_watchface_editable_get_current_data_n2(void)
-{
- int ret;
-
- ret = watchface_editable_get_current_data(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-static void _get_cur_data_update_requested_cb(const watchface_editable_h handle,
- int selected_idx,
- const watchface_editable_edit_state_e state,
- void *user_data)
-{
- int ret;
- bundle *data = NULL;
-
- ret = watchface_editable_get_current_data(handle, &data);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- assert_neq_with_exit_no_returnval(data, NULL);
- bundle_free(data);
-
- normal_exit_no_returnval(ret);
-}
-
-static void _get_cur_data_on_edit_ready(
- watchface_editable_container_h ed_con_h,
- const char *editor_appid,
- void *user_data) {
- int ret;
- ret = _request_edit_with_design_elements(
- ed_con_h, _get_cur_data_update_requested_cb);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-}
-
-/**
- * @testcase utc_watchface_editable_get_current_data_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_get_current_data()
- */
-int utc_watchface_editable_get_current_data_p(void)
-{
- int ret;
-
- ret = watchface_editable_add_edit_ready_cb(_get_cur_data_on_edit_ready, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- _run_editor_app();
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_editable_get_current_data_idx_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_get_current_data_idx()
- */
-int utc_watchface_editable_get_current_data_idx_n1(void)
-{
- int ret;
- int idx = 0;
-
- ret = watchface_editable_get_current_data_idx(NULL, &idx);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_get_current_data_idx_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_get_current_data_idx()
- */
-int utc_watchface_editable_get_current_data_idx_n2(void)
-{
- int ret;
-
- ret = watchface_editable_get_current_data_idx(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-static void _get_cur_data_idx_update_requested_cb(const watchface_editable_h handle,
- int selected_idx,
- const watchface_editable_edit_state_e state,
- void *user_data)
-{
- int ret;
- int idx;
-
- ret = watchface_editable_get_current_data_idx(handle, &idx);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- normal_exit_no_returnval(ret);
-}
-
-static void _get_cur_data_idx_on_edit_ready(
- watchface_editable_container_h ed_con_h,
- const char *editor_appid,
- void *user_data) {
- int ret;
- ret = _request_edit_with_design_elements(
- ed_con_h, _get_cur_data_idx_update_requested_cb);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-}
-
-/**
- * @testcase utc_watchface_editable_get_current_data_idx_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_get_current_data_idx()
- */
-int utc_watchface_editable_get_current_data_idx_p(void)
-{
- int ret;
-
- ret = watchface_editable_add_edit_ready_cb(_get_cur_data_idx_on_edit_ready, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- _run_editor_app();
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_editable_get_editable_id_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_get_editable_id()
- */
-int utc_watchface_editable_get_editable_id_n1(void)
-{
- int ret;
- int editable_id;
-
- ret = watchface_editable_get_editable_id(NULL, &editable_id);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_get_editable_id_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_get_editable_id()
- */
-int utc_watchface_editable_get_editable_id_n2(void)
-{
- int ret;
-
- ret = watchface_editable_get_editable_id(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-
-static void _get_editable_id_update_requested_cb(const watchface_editable_h handle,
- int selected_idx,
- const watchface_editable_edit_state_e state,
- void *user_data)
-{
- int ret;
- int id;
-
- ret = watchface_editable_get_editable_id(handle, &id);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- normal_exit_no_returnval(ret);
-}
-
-static void _get_editable_id_on_edit_ready(
- watchface_editable_container_h ed_con_h,
- const char *editor_appid,
- void *user_data) {
- int ret;
- ret = _request_edit_with_design_elements(
- ed_con_h, _get_editable_id_update_requested_cb);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-}
-
-/**
- * @testcase utc_watchface_editable_get_editable_id_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_get_editable_id()
- */
-int utc_watchface_editable_get_editable_id_p(void)
-{
- int ret;
-
- ret = watchface_editable_add_edit_ready_cb(_get_editable_id_on_edit_ready, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- _run_editor_app();
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_editable_get_highlight_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_get_highlight()
- */
-int utc_watchface_editable_get_highlight_n1(void)
-{
- int ret;
- watchface_editable_highlight_h highlight;
-
- ret = watchface_editable_get_highlight(NULL, &highlight);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_get_highlight_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_get_highlight()
- */
-int utc_watchface_editable_get_highlight_n2(void)
-{
- int ret;
-
- ret = watchface_editable_get_highlight(NULL, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-
-static void _get_highlight_update_requested_cb(const watchface_editable_h handle,
- int selected_idx,
- const watchface_editable_edit_state_e state,
- void *user_data)
-{
- int ret;
- watchface_editable_highlight_h highlight;
- int x;
- int y;
- int w;
- int h;
-
- ret = watchface_editable_get_highlight(handle, &highlight);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_get_geometry(highlight, &x, &y, &w, &h);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- watchface_editable_highlight_destroy(highlight);
-
- assert_eq_with_exit_no_returnval(x, GEO_X);
- assert_eq_with_exit_no_returnval(y, GEO_Y);
- assert_eq_with_exit_no_returnval(h, GEO_H);
- assert_eq_with_exit_no_returnval(w, GEO_W);
-
- normal_exit_no_returnval(ret);
-}
-
-static void _get_highlight_on_edit_ready(
- watchface_editable_container_h ed_con_h,
- const char *editor_appid,
- void *user_data) {
- int ret;
- ret = _request_edit_with_design_elements(
- ed_con_h, _get_highlight_update_requested_cb);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-}
-
-/**
- * @testcase utc_watchface_editable_get_highlight_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_get_highlight()
- */
-int utc_watchface_editable_get_highlight_p(void)
-{
- int ret;
-
- ret = watchface_editable_add_edit_ready_cb(_get_highlight_on_edit_ready, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- _run_editor_app();
-
- return 0;
-
-}
-
-/**
- * @testcase utc_watchface_editable_load_current_data_n
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_load_current_data()
- */
-int utc_watchface_editable_load_current_data_n(void)
-{
- int ret;
- int edit_id = 1;
-
- ret = watchface_editable_load_current_data(edit_id, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-static void _load_current_data_update_requested_cb(const watchface_editable_h handle,
- int selected_idx,
- const watchface_editable_edit_state_e state,
- void *user_data)
-{
- int ret;
- bundle *selected_data = NULL;
- int edit_id;
-
- if (state == WATCHFACE_EDITABLE_EDIT_STATE_COMPLETE) {
- watchface_editable_get_editable_id(handle, &edit_id);
- ret = watchface_editable_load_current_data(edit_id, &selected_data);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- if (selected_data)
- bundle_free(selected_data);
-
- normal_exit_no_returnval(ret);
- }
-}
-
-static void _load_current_data_on_edit_ready(
- watchface_editable_container_h ed_con_h,
- const char *editor_appid,
- void *user_data) {
- int ret;
- ret = _request_edit_with_design_elements(
- ed_con_h, _load_current_data_update_requested_cb);
- assert_eq_with_exit_no_returnval(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-}
-
-/**
- * @testcase utc_watchface_editable_load_current_data_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_load_current_data()
- */
-int utc_watchface_editable_load_current_data_p(void)
-{
- int ret;
-
- ret = watchface_editable_add_edit_ready_cb(_load_current_data_on_edit_ready, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
- _run_editor_app();
-
- return 0;
-}
-
-/**
- * @testcase utc_watchface_editable_highlight_create_n
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_highlight_create()
- */
-int utc_watchface_editable_highlight_create_n(void)
-{
- int ret;
-
- ret = watchface_editable_highlight_create(NULL,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_highlight_create_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_highlight_create()
- */
-int utc_watchface_editable_highlight_create_p(void)
-{
- int ret;
- watchface_editable_highlight_h handle;
-
- ret = watchface_editable_highlight_create(&handle,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- watchface_editable_highlight_destroy(handle);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_highlight_destroy_n
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_highlight_destroy()
- */
-int utc_watchface_editable_highlight_destroy_n(void)
-{
- int ret;
-
- ret = watchface_editable_highlight_destroy(NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_highlight_destroy_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_highlight_destroy()
- */
-int utc_watchface_editable_highlight_destroy_p(void)
-{
- int ret;
- watchface_editable_highlight_h handle;
-
- ret = watchface_editable_highlight_create(&handle,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_destroy(handle);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_highlight_set_geometry_n
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_highlight_set_geometry()
- */
-int utc_watchface_editable_highlight_set_geometry_n(void)
-{
- int ret;
-
- ret = watchface_editable_highlight_set_geometry(NULL, 0, 0, 0, 0);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_highlight_set_geometry_p
- * @since_tizen 5.0
- * @description Positive test case of watchface_editable_highlight_set_geometry()
- */
-int utc_watchface_editable_highlight_set_geometry_p(void)
-{
- int ret;
- watchface_editable_highlight_h handle;
-
- ret = watchface_editable_highlight_create(&handle,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_set_geometry(handle, 100, 100, 30, 30);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- watchface_editable_highlight_destroy(handle);
-
- normal_exit(0);
-}
-
-
-/**
- * @testcase utc_watchface_editable_highlight_get_geometry_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_highlight_get_geometry()
- */
-int utc_watchface_editable_highlight_get_geometry_n1(void)
-{
- int ret;
- int x;
- int y;
- int w;
- int h;
-
- ret = watchface_editable_highlight_get_geometry(NULL, &x, &y, &w, &h);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_highlight_get_geometry_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_highlight_get_geometry()
- */
-int utc_watchface_editable_highlight_get_geometry_n2(void)
-{
- int ret;
- int y;
- int w;
- int h;
- watchface_editable_highlight_h handle;
-
- ret = watchface_editable_highlight_create(&handle,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_get_geometry(handle, NULL, &y, &w, &h);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_highlight_get_geometry_n3
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_highlight_get_geometry()
- */
-int utc_watchface_editable_highlight_get_geometry_n3(void)
-{
- int ret;
- int x;
- int w;
- int h;
- watchface_editable_highlight_h handle;
-
- ret = watchface_editable_highlight_create(&handle,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_get_geometry(handle, &x, NULL, &w, &h);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_highlight_get_geometry_n4
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_highlight_get_geometry()
- */
-int utc_watchface_editable_highlight_get_geometry_n4(void)
-{
- int ret;
- int x;
- int y;
- int h;
- watchface_editable_highlight_h handle;
-
- ret = watchface_editable_highlight_create(&handle,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_get_geometry(handle, &x, &y, NULL, &h);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_highlight_get_geometry_n5
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_highlight_get_geometry()
- */
-int utc_watchface_editable_highlight_get_geometry_n5(void)
-{
- int ret;
- int x;
- int y;
- int w;
- watchface_editable_highlight_h handle;
-
- ret = watchface_editable_highlight_create(&handle,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_get_geometry(handle, &x, &y, &w, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_highlight_get_geometry_p
- * @since_tizen 5.0
- * @description Postive test case of watchface_editable_highlight_get_geometry()
- */
-int utc_watchface_editable_highlight_get_geometry_p(void)
-{
- int ret;
- int x;
- int y;
- int w;
- int h;
- watchface_editable_highlight_h handle;
-
- ret = watchface_editable_highlight_create(&handle,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_set_geometry(handle, 100, 100, 30, 30);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_get_geometry(handle, &x, &y, &w, &h);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- watchface_editable_highlight_destroy(handle);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_highlight_set_shape_type_p
- * @since_tizen 5.0
- * @description Postive test case of watchface_editable_highlight_set_shape_type()
- */
-int utc_watchface_editable_highlight_set_shape_type_p(void)
-{
- int ret;
- watchface_editable_highlight_h handle;
-
- ret = watchface_editable_highlight_create(&handle,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_set_shape_type(handle, WATCHFACE_EDITABLE_SHAPE_TYPE_RECT);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- watchface_editable_highlight_destroy(handle);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_highlight_set_shape_type_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_highlight_set_shape_type()
- */
-int utc_watchface_editable_highlight_set_shape_type_n1(void)
-{
- int ret;
-
- ret = watchface_editable_highlight_set_shape_type(NULL, WATCHFACE_EDITABLE_SHAPE_TYPE_RECT);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_highlight_set_shape_type_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_highlight_set_shape_type()
- */
-int utc_watchface_editable_highlight_set_shape_type_n2(void)
-{
- int ret;
- watchface_editable_highlight_h handle;
-
- ret = watchface_editable_highlight_create(&handle,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_set_shape_type(handle, -1);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- watchface_editable_highlight_destroy(handle);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_highlight_get_shape_type_p
- * @since_tizen 5.0
- * @description Postive test case of watchface_editable_highlight_get_shape_type()
- */
-int utc_watchface_editable_highlight_get_shape_type_p(void)
-{
- int ret;
- watchface_editable_highlight_h handle;
- watchface_editable_shape_type_e shape;
-
- ret = watchface_editable_highlight_create(&handle,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_set_shape_type(handle, WATCHFACE_EDITABLE_SHAPE_TYPE_RECT);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_get_shape_type(handle, &shape);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- watchface_editable_highlight_destroy(handle);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_highlight_get_shape_type_n1
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_highlight_get_shape_type()
- */
-int utc_watchface_editable_highlight_get_shape_type_n1(void)
-{
- int ret;
- watchface_editable_shape_type_e shape;
-
- ret = watchface_editable_highlight_get_shape_type(NULL, &shape);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- normal_exit(0);
-}
-
-/**
- * @testcase utc_watchface_editable_highlight_get_shape_type_n2
- * @since_tizen 5.0
- * @description Negative test case of watchface_editable_highlight_get_shape_type()
- */
-int utc_watchface_editable_highlight_get_shape_type_n2(void)
-{
- int ret;
- watchface_editable_highlight_h handle;
-
- ret = watchface_editable_highlight_create(&handle,
- WATCHFACE_EDITABLE_SHAPE_TYPE_CIRCLE);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_NONE);
-
- ret = watchface_editable_highlight_get_shape_type(handle, NULL);
- assert_eq_with_exit(ret, WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER);
-
- watchface_editable_highlight_destroy(handle);
-
- normal_exit(0);
-}