0009_input: Add ecore_wl2_input_keyboard_repeat_set/get TCs 87/313687/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 1 Jul 2024 04:22:29 +0000 (13:22 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 1 Jul 2024 04:22:29 +0000 (13:22 +0900)
Change-Id: I261b9b020bd2b426f85567b04513a878f381c185
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/testcase/0009_input.cpp

index e6821439cc163c627ec2e033c4dc93ea38f5b837..508fe0037790e30ecea6748443c4d448ab1ec120 100644 (file)
@@ -662,6 +662,49 @@ TEST_F(etTestInput, input_name_get_null_input)
    ASSERT_EQ(name, nullptr);
 }
 
+
+TEST_F(etTestInput, input_keyboard_repeat_set)
+{
+   Eina_Bool ret = EINA_FALSE;
+   Ecore_Wl2_Display *display = NULL;
+   Ecore_Wl2_Input *input = NULL;
+   double init_rate = 2.0, init_delay = 2.0;
+   double rate, delay;
+
+   display = ecore_wl2_connected_display_get(NULL);
+   EINA_SAFETY_ON_NULL_RETURN(display);
+
+   input = ecore_wl2_input_default_input_get(display);
+   EINA_SAFETY_ON_NULL_RETURN(input);
+
+   ret = ecore_wl2_input_keyboard_repeat_set(input, init_rate, init_delay);
+   ASSERT_TRUE(ret);
+
+   ret = ecore_wl2_input_keyboard_repeat_get(input, &rate, &delay);
+   ASSERT_TRUE(ret);
+
+   ASSERT_EQ(rate, init_rate);
+   ASSERT_EQ(delay, init_delay);
+}
+
+TEST_F(etTestInput, input_keyboard_repeat_set_null_input)
+{
+   Eina_Bool ret = EINA_FALSE;
+   double init_rate = 2.0, init_delay = 2.0;
+
+   ret = ecore_wl2_input_keyboard_repeat_set(NULL, init_rate, init_delay);
+   ASSERT_FALSE(ret);
+}
+
+TEST_F(etTestInput, input_keyboard_repeat_get_null_input)
+{
+   Eina_Bool ret = EINA_FALSE;
+   double rate, delay;
+
+   ret = ecore_wl2_input_keyboard_repeat_get(NULL, &rate, &delay);
+   ASSERT_FALSE(ret);
+}
+
 TEST_F(etTestInput, keyboard_get)
 {
    Ecore_Wl2_Window *wlwin = NULL;