</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>
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) {
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);
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_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 void utc_watchface_complication_provider_startup(void);
extern void utc_watchface_complication_provider_cleanup(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 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_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_n(void);
-extern int utc_watchface_editable_highlight_set_p(void);
-extern int utc_watchface_editable_highlight_get_n1(void);
-extern int utc_watchface_editable_highlight_get_n2(void);
-extern int utc_watchface_editable_highlight_get_n3(void);
-extern int utc_watchface_editable_highlight_get_n4(void);
-extern int utc_watchface_editable_highlight_get_n5(void);
-extern int utc_watchface_editable_highlight_get_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_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_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_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_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_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_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_n", utc_watchface_editable_highlight_set_n, NULL, NULL},
- {"utc_watchface_editable_highlight_set_p", utc_watchface_editable_highlight_set_p, NULL, NULL},
- {"utc_watchface_editable_highlight_get_n1", utc_watchface_editable_highlight_get_n1, NULL, NULL},
- {"utc_watchface_editable_highlight_get_n2", utc_watchface_editable_highlight_get_n2, NULL, NULL},
- {"utc_watchface_editable_highlight_get_n3", utc_watchface_editable_highlight_get_n3, NULL, NULL},
- {"utc_watchface_editable_highlight_get_n4", utc_watchface_editable_highlight_get_n4, NULL, NULL},
- {"utc_watchface_editable_highlight_get_n5", utc_watchface_editable_highlight_get_n5, NULL, NULL},
- {"utc_watchface_editable_highlight_get_p", utc_watchface_editable_highlight_get_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__
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;
+
+ 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);
+ 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, 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_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);
+}
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
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);
+}
#define SETUP_REPLY_TO_EDITOR_TEST_VAL "SETUP_REPLY_TO_EDITOR_TEST_VAL"
#define SETUP_GET_CONTEXT_TEST_VAL "SETUP_GET_CONTEXT_VAL"
-#define TOUCH_LAUNCH_IS_TEST_VAL "TOUCH_LAUNCH_IS_TEST_VAL"
-#define TOUCH_LAUNCH_GET_PROVIDER_ID_TEST_VAL "TOUCH_LAUNCH_GET_PROVIDER_ID_TEST_VAL"
-#define TOUCH_LAUNCH_GET_COMP_TYPE_TEST_VAL "TOUCH_LAUNCH_GET_COMP_TYPE_TEST_VAL"
-#define TOUCH_LAUNCH_GET_CONTEXT_TEST_VAL "TOUCH_LAUNCH_GET_CONTEXT_TEST_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;
#define assert_with_exit(exp) do { \
if (!(exp)) { \
}
/**
- * @testcase utc_watchface_editable_highlight_set_n
+ * @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_n(void)
+int utc_watchface_editable_highlight_set_geometry_n(void)
{
int ret;
}
/**
- * @testcase utc_watchface_editable_highlight_set_p
+ * @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_p(void)
+int utc_watchface_editable_highlight_set_geometry_p(void)
{
int ret;
watchface_editable_highlight_h handle;
/**
- * @testcase utc_watchface_editable_highlight_get_n1
+ * @testcase utc_watchface_editable_highlight_get_geometry_n1
* @since_tizen 5.0
- * @description Negative test case of watchface_editable_highlight_get()
+ * @description Negative test case of watchface_editable_highlight_get_geometry()
*/
-int utc_watchface_editable_highlight_get_n1(void)
+int utc_watchface_editable_highlight_get_geometry_n1(void)
{
int ret;
int x;
}
/**
- * @testcase utc_watchface_editable_highlight_get_n2
+ * @testcase utc_watchface_editable_highlight_get_geometry_n2
* @since_tizen 5.0
- * @description Negative test case of watchface_editable_highlight_get()
+ * @description Negative test case of watchface_editable_highlight_get_geometry()
*/
-int utc_watchface_editable_highlight_get_n2(void)
+int utc_watchface_editable_highlight_get_geometry_n2(void)
{
int ret;
int y;
}
/**
- * @testcase utc_watchface_editable_highlight_get_n3
+ * @testcase utc_watchface_editable_highlight_get_geometry_n3
* @since_tizen 5.0
- * @description Negative test case of watchface_editable_highlight_get()
+ * @description Negative test case of watchface_editable_highlight_get_geometry()
*/
-int utc_watchface_editable_highlight_get_n3(void)
+int utc_watchface_editable_highlight_get_geometry_n3(void)
{
int ret;
int x;
}
/**
- * @testcase utc_watchface_editable_highlight_get_n4
+ * @testcase utc_watchface_editable_highlight_get_geometry_n4
* @since_tizen 5.0
- * @description Negative test case of watchface_editable_highlight_get()
+ * @description Negative test case of watchface_editable_highlight_get_geometry()
*/
-int utc_watchface_editable_highlight_get_n4(void)
+int utc_watchface_editable_highlight_get_geometry_n4(void)
{
int ret;
int x;
}
/**
- * @testcase utc_watchface_editable_highlight_get_n5
+ * @testcase utc_watchface_editable_highlight_get_geometry_n5
* @since_tizen 5.0
- * @description Negative test case of watchface_editable_highlight_get()
+ * @description Negative test case of watchface_editable_highlight_get_geometry()
*/
-int utc_watchface_editable_highlight_get_n5(void)
+int utc_watchface_editable_highlight_get_geometry_n5(void)
{
int ret;
int x;
}
/**
- * @testcase utc_watchface_editable_highlight_get_p
+ * @testcase utc_watchface_editable_highlight_get_geometry_p
* @since_tizen 5.0
- * @description Postive test case of watchface_editable_highlight_get()
+ * @description Postive test case of watchface_editable_highlight_get_geometry()
*/
-int utc_watchface_editable_highlight_get_p(void)
+int utc_watchface_editable_highlight_get_geometry_p(void)
{
int ret;
int x;
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);
+}