bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d54ba9421431912f4b08a843584ac7584a477f1d
commit d54ba9421431912f4b08a843584ac7584a477f1d Author: Mike Blumenkrantz <[email protected]> Date: Tue Nov 26 10:54:36 2019 -0500 tests/layout: validate EFL_UI_LAYOUT_EVENT_THEME_CHANGED emission in theme test ensure that this callback is emitted exactly one time if the theme is set during construction Reviewed-by: Marcel Hollerbach <[email protected]> Differential Revision: https://phab.enlightenment.org/D10740 --- src/tests/elementary/efl_ui_test_layout.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tests/elementary/efl_ui_test_layout.c b/src/tests/elementary/efl_ui_test_layout.c index 6a1763f620..fc7a3b969c 100644 --- a/src/tests/elementary/efl_ui_test_layout.c +++ b/src/tests/elementary/efl_ui_test_layout.c @@ -154,9 +154,11 @@ EFL_START_TEST(efl_ui_layout_test_layout_theme) Evas_Object *win; const char *klass, *group, *style; Eina_Error err; + int called = 0; win = win_add(NULL, "layout", EFL_UI_WIN_TYPE_BASIC); Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, win, + efl_event_callback_add(efl_added, EFL_UI_LAYOUT_EVENT_THEME_CHANGED, (void*)event_callback_single_call_int_data, &called), err = efl_ui_layout_theme_set(efl_added, "button", NULL, "anchor") ); ck_assert_int_eq(err, 0); @@ -164,6 +166,7 @@ EFL_START_TEST(efl_ui_layout_test_layout_theme) ck_assert_str_eq(klass, "button"); ck_assert(!group); ck_assert_str_eq(style, "anchor"); + ck_assert_int_eq(called, 1); } EFL_END_TEST --
