tests/layout: fix theme apply test for layout object

the group previously used (efl/win/background) no longer exists, and
this test never verified that the theme_set call succeeded so this has
been failing silently for a long time

now we check and verify that the call succeeds in addition to using a
valid group

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10739
This commit is contained in:
Mike Blumenkrantz 2019-11-26 10:52:31 -05:00 committed by Marcel Hollerbach
parent 3f7a63149a
commit 8729c4b0b5
1 changed files with 6 additions and 4 deletions

View File

@ -153,15 +153,17 @@ EFL_START_TEST(efl_ui_layout_test_layout_theme)
{
Evas_Object *win;
const char *klass, *group, *style;
Eina_Error err;
win = win_add(NULL, "layout", EFL_UI_WIN_TYPE_BASIC);
Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, win,
efl_ui_layout_theme_set(efl_added, "win", "background", NULL)
err = efl_ui_layout_theme_set(efl_added, "button", NULL, "anchor")
);
ck_assert_int_eq(err, 0);
efl_ui_layout_theme_get(layout, &klass, &group, &style);
ck_assert_str_eq(klass, "win");
ck_assert_str_eq(group, "background");
ck_assert(!style);
ck_assert_str_eq(klass, "button");
ck_assert(!group);
ck_assert_str_eq(style, "anchor");
}
EFL_END_TEST