From: Jihoon Kim Date: Fri, 19 Feb 2021 04:01:14 +0000 (+0900) Subject: Add TCs for APIs added in 6.5 X-Git-Tag: submit/tizen/20210503.024800~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F79%2F253879%2F2;p=platform%2Fcore%2Fapi%2Finputmethod.git Add TCs for APIs added in 6.5 Positive TCs will be added later. Change-Id: Ie59db3809ae0e0b172cff26b8820743c2bd88fa2 Signed-off-by: Jihoon Kim --- diff --git a/tests/src/inputmethod_unittests.cpp b/tests/src/inputmethod_unittests.cpp index ecd0aca..cc6a705 100644 --- a/tests/src/inputmethod_unittests.cpp +++ b/tests/src/inputmethod_unittests.cpp @@ -177,6 +177,10 @@ static bool _process_key_event_with_keycode_cb(unsigned int key_code, ime_key_co { return true; } + +static void _input_hint_set_cb(Ecore_IMF_Input_Hints input_hint, void *user_data) +{ +} //LCOV_EXCL_STOP /** @@ -388,6 +392,28 @@ TEST_F(InputMethodTest, utc_ime_event_set_option_window_destroyed_cb_p) EXPECT_EQ(ret, IME_ERROR_NONE); } +/** + * @testcase utc_ime_event_set_input_hint_set_cb_p + * @since_tizen 6.5 + * @description Positive UTC of the function that sets @c input_hint_set event callback function. + */ +TEST_F(InputMethodTest, utc_ime_event_set_input_hint_set_cb_p) +{ + int ret = ime_event_set_input_hint_set_cb(_input_hint_set_cb, NULL); + EXPECT_EQ(ret, IME_ERROR_NONE); +} + +/** + * @testcase utc_ime_event_unset_input_hint_set_cb_p + * @since_tizen 6.5 + * @description Positive UTC of the function that unsets @c input_hint_set event callback function. + */ +TEST_F(InputMethodTest, utc_ime_event_unset_input_hint_set_cb_p) +{ + int ret = ime_event_unset_input_hint_set_cb(); + EXPECT_EQ(ret, IME_ERROR_NONE); +} + /** * @testcase utc_ime_event_set_prediction_hint_set_cb_p * @since_tizen 4.0 @@ -654,6 +680,17 @@ TEST_F(InputMethodTest, utc_ime_event_set_option_window_destroyed_cb_n) EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER); } +/** + * @testcase utc_ime_event_set_input_hint_set_cb_n + * @since_tizen 6.5 + * @description Negative UTC of the function that sets @c input_hint_set event callback function. + */ +TEST_F(InputMethodTest, utc_ime_event_set_input_hint_set_cb_n) +{ + int ret = ime_event_set_input_hint_set_cb(NULL, NULL); + EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER); +} + /** * @testcase utc_ime_send_key_event_n * @since_tizen 2.4 @@ -1403,6 +1440,17 @@ TEST_F(InputMethodTest, utc_ime_set_candidate_visibility_state_n) EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING); } +/** + * @testcase utc_ime_update_preedit_cursor_n + * @since_tizen 6.5 + * @description Negative UTC of the function that updates the position of preedit cursor. + */ +TEST_F(InputMethodTest, utc_ime_update_preedit_cursor_n) +{ + int ret = ime_update_preedit_cursor(0); + EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING); +} + /** * @testcase utc_ime_event_set_process_input_device_event_cb_n * @since_tizen 3.0