forked from enlightenment/efl
tests/ecore_wl2: Add dummy tests for ecore_wl2_* functions.
Summary: Add dummy tests for below functions. Updates will be... when there is a better verification method. ref T8016 Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8016 Differential Revision: https://phab.enlightenment.org/D11214
This commit is contained in:
parent
9cb73aea1b
commit
0bf3fd3866
|
@ -7,6 +7,7 @@ static const Efl_Test_Case etc[] =
|
|||
{ "Display", ecore_wl2_test_display },
|
||||
{ "Window", ecore_wl2_test_window },
|
||||
{ "Input", ecore_wl2_test_input },
|
||||
{ "Output", ecore_wl2_test_output },
|
||||
#endif
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
|
|
@ -16,5 +16,6 @@ void ecore_wl2_test_init(TCase *tc);
|
|||
void ecore_wl2_test_display(TCase *tc);
|
||||
void ecore_wl2_test_window(TCase *tc);
|
||||
void ecore_wl2_test_input(TCase *tc);
|
||||
void ecore_wl2_test_output(TCase *tc);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,8 +5,19 @@ EFL_START_TEST(ecore_wl2_simple)
|
|||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(wl2_session_recovery_disable)
|
||||
{
|
||||
//FIXME: Need some discussion about how to validate this API in TC.
|
||||
ecore_wl2_session_recovery_disable();
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
void
|
||||
ecore_wl2_test_init(TCase *tc)
|
||||
{
|
||||
tcase_add_test(tc, ecore_wl2_simple);
|
||||
if (getenv("E_START"))
|
||||
{
|
||||
tcase_add_test(tc, wl2_session_recovery_disable);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -227,6 +227,60 @@ EFL_START_TEST(wl2_input_keyboard_repeat)
|
|||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(wl2_input_cursor_from_name_set)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
Ecore_Wl2_Input *input;
|
||||
Eina_Iterator *itr;
|
||||
|
||||
disp = _display_connect();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
itr = ecore_wl2_display_inputs_get(disp);
|
||||
ck_assert(itr != NULL);
|
||||
|
||||
EINA_ITERATOR_FOREACH(itr, input)
|
||||
{
|
||||
if (ecore_wl2_input_seat_capabilities_get(input) ==
|
||||
ECORE_WL2_SEAT_CAPABILITIES_POINTER)
|
||||
{
|
||||
//FIXME: Need some discussion about how to validate this API in TC.
|
||||
ecore_wl2_input_cursor_from_name_set(input, NULL);
|
||||
ecore_wl2_input_cursor_from_name_set(NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
eina_iterator_free(itr);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(wl2_input_pointer_set)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
Ecore_Wl2_Input *input;
|
||||
Eina_Iterator *itr;
|
||||
|
||||
disp = _display_connect();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
itr = ecore_wl2_display_inputs_get(disp);
|
||||
ck_assert(itr != NULL);
|
||||
|
||||
EINA_ITERATOR_FOREACH(itr, input)
|
||||
{
|
||||
if (ecore_wl2_input_seat_capabilities_get(input) ==
|
||||
ECORE_WL2_SEAT_CAPABILITIES_POINTER)
|
||||
{
|
||||
//FIXME: Need some discussion about how to validate this API in TC.
|
||||
ecore_wl2_input_pointer_set(input, NULL, 0, 0);
|
||||
ecore_wl2_input_pointer_set(NULL, NULL, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
eina_iterator_free(itr);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
void
|
||||
ecore_wl2_test_input(TCase *tc)
|
||||
{
|
||||
|
@ -240,5 +294,7 @@ ecore_wl2_test_input(TCase *tc)
|
|||
tcase_add_test(tc, wl2_input_seat_capabilities);
|
||||
tcase_add_test(tc, wl2_input_pointer_xy);
|
||||
tcase_add_test(tc, wl2_input_keyboard_repeat);
|
||||
tcase_add_test(tc, wl2_input_cursor_from_name_set);
|
||||
tcase_add_test(tc, wl2_input_pointer_set);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
#include "ecore_wl2_suite.h"
|
||||
|
||||
EFL_START_TEST(wl2_output_dpi_get)
|
||||
{
|
||||
int ret;
|
||||
|
||||
//FIXME: Need some discussion about how to validate this API in TC.
|
||||
ret = ecore_wl2_output_dpi_get(NULL);
|
||||
|
||||
fail_if(ret != 75);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(wl2_output_transform_get)
|
||||
{
|
||||
int ret;
|
||||
|
||||
//FIXME: Need some discussion about how to validate this API in TC.
|
||||
ret = ecore_wl2_output_transform_get(NULL);
|
||||
|
||||
fail_if(ret != 0);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
void
|
||||
ecore_wl2_test_output(TCase *tc)
|
||||
{
|
||||
if (getenv("WAYLAND_DISPLAY"))
|
||||
{
|
||||
tcase_add_test(tc, wl2_output_dpi_get);
|
||||
tcase_add_test(tc, wl2_output_transform_get);
|
||||
}
|
||||
}
|
|
@ -934,6 +934,25 @@ EFL_START_TEST(wl2_window_resizing_get)
|
|||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(wl2_window_output_find)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
Ecore_Wl2_Window *win;
|
||||
Ecore_Wl2_Output *output;
|
||||
|
||||
disp = _display_connect();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
win = _window_create(disp);
|
||||
ck_assert(win != NULL);
|
||||
|
||||
//FIXME: Need some discussion about how to validate this API in TC.
|
||||
output = ecore_wl2_window_output_find(win);
|
||||
output = ecore_wl2_window_output_find(NULL);
|
||||
fail_if (output != NULL);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
void
|
||||
ecore_wl2_test_window(TCase *tc)
|
||||
{
|
||||
|
@ -976,5 +995,6 @@ ecore_wl2_test_window(TCase *tc)
|
|||
tcase_add_test(tc, wl2_window_move);
|
||||
tcase_add_test(tc, wl2_window_resize);
|
||||
tcase_add_test(tc, wl2_window_resizing_get);
|
||||
tcase_add_test(tc, wl2_window_output_find);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,8 @@ ecore_wl2_suite_src = [
|
|||
'ecore_wl2_test_ecore_wl2.c',
|
||||
'ecore_wl2_test_display.c',
|
||||
'ecore_wl2_test_window.c',
|
||||
'ecore_wl2_test_input.c'
|
||||
'ecore_wl2_test_input.c',
|
||||
'ecore_wl2_test_output.c'
|
||||
]
|
||||
|
||||
wl2_test_gl_deps = []
|
||||
|
|
Loading…
Reference in New Issue