Add TCs for APIs added in 6.5 79/253879/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 19 Feb 2021 04:01:14 +0000 (13:01 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 25 Feb 2021 01:07:41 +0000 (10:07 +0900)
Positive TCs will be added later.

Change-Id: Ie59db3809ae0e0b172cff26b8820743c2bd88fa2
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
tests/src/inputmethod_unittests.cpp

index ecd0aca..cc6a705 100644 (file)
@@ -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
 
 /**
@@ -389,6 +393,28 @@ TEST_F(InputMethodTest, utc_ime_event_set_option_window_destroyed_cb_p)
 }
 
 /**
+ * @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
  * @description     Positive UTC of the function that sets @c prediction_hint event callback function.
@@ -655,6 +681,17 @@ TEST_F(InputMethodTest, utc_ime_event_set_option_window_destroyed_cb_n)
 }
 
 /**
+ * @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
  * @description                Negative UTC of the function that sends a key event to the associated text input UI control.
@@ -1404,6 +1441,17 @@ TEST_F(InputMethodTest, utc_ime_set_candidate_visibility_state_n)
 }
 
 /**
+ * @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
  * @description                Negative UTC of the function that called when the input event is received from an unconventional input device that does not generate key events.