summaryrefslogtreecommitdiff
path: root/src/tests/elementary/efl_ui_test_layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/elementary/efl_ui_test_layout.c')
-rw-r--r--src/tests/elementary/efl_ui_test_layout.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/tests/elementary/efl_ui_test_layout.c b/src/tests/elementary/efl_ui_test_layout.c
index 660010b..8f52408 100644
--- a/src/tests/elementary/efl_ui_test_layout.c
+++ b/src/tests/elementary/efl_ui_test_layout.c
@@ -28,11 +28,11 @@ EFL_START_TEST(efl_ui_layout_test_property_bind)
28 const char *part_text; 28 const char *part_text;
29 const char text_value[] = "A random string for elm_layout_property_bind test"; 29 const char text_value[] = "A random string for elm_layout_property_bind test";
30 30
31 win = win_add(NULL, "layout", EFL_UI_WIN_BASIC); 31 win = win_add(NULL, "layout", EFL_UI_WIN_TYPE_BASIC);
32 32
33 ly = efl_add(EFL_UI_LAYOUT_CLASS, win); 33 ly = efl_add(EFL_UI_LAYOUT_CLASS, win);
34 snprintf(buf, sizeof(buf), "%s/objects/test.edj", ELM_TEST_DATA_DIR); 34 snprintf(buf, sizeof(buf), "%s/objects/test.edj", ELM_TEST_DATA_DIR);
35 efl_file_set(ly, buf, "layout"); 35 efl_file_simple_load(ly, buf, "layout");
36 efl_gfx_entity_visible_set(ly, EINA_TRUE); 36 efl_gfx_entity_visible_set(ly, EINA_TRUE);
37 37
38 model = efl_add(EFL_GENERIC_MODEL_CLASS, win); 38 model = efl_add(EFL_GENERIC_MODEL_CLASS, win);
@@ -58,7 +58,7 @@ EFL_START_TEST(efl_ui_layout_test_layout_api_size_min)
58 Evas_Object *win; 58 Evas_Object *win;
59 Eina_Size2D res; 59 Eina_Size2D res;
60 60
61 win = win_add(NULL, "layout", EFL_UI_WIN_BASIC); 61 win = win_add(NULL, "layout", EFL_UI_WIN_TYPE_BASIC);
62 /* this is just a test to not get segfaults in those calls */ 62 /* this is just a test to not get segfaults in those calls */
63 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, win); 63 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, win);
64 res = efl_layout_calc_size_min(layout, EINA_SIZE2D(2, 2)); 64 res = efl_layout_calc_size_min(layout, EINA_SIZE2D(2, 2));
@@ -71,7 +71,7 @@ EFL_START_TEST(efl_ui_layout_test_layout_api_update_hints)
71{ 71{
72 Evas_Object *win; 72 Evas_Object *win;
73 73
74 win = win_add(NULL, "layout", EFL_UI_WIN_BASIC); 74 win = win_add(NULL, "layout", EFL_UI_WIN_TYPE_BASIC);
75 /* this is just a test to not get segfaults in those calls */ 75 /* this is just a test to not get segfaults in those calls */
76 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, win); 76 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, win);
77 efl_layout_calc_auto_update_hints_set(layout, EINA_TRUE); 77 efl_layout_calc_auto_update_hints_set(layout, EINA_TRUE);
@@ -83,17 +83,34 @@ EFL_START_TEST(efl_ui_layout_test_layout_force)
83{ 83{
84 Evas_Object *win; 84 Evas_Object *win;
85 85
86 win = win_add(NULL, "layout", EFL_UI_WIN_BASIC); 86 win = win_add(NULL, "layout", EFL_UI_WIN_TYPE_BASIC);
87 /* this is just a test to not get segfaults in those calls */ 87 /* this is just a test to not get segfaults in those calls */
88 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, win); 88 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, win);
89 efl_layout_calc_force(layout); 89 efl_layout_calc_force(layout);
90} 90}
91EFL_END_TEST 91EFL_END_TEST
92 92
93EFL_START_TEST(efl_ui_layout_test_layout_theme)
94{
95 Evas_Object *win;
96 const char *klass, *group, *style;
97
98 win = win_add(NULL, "layout", EFL_UI_WIN_TYPE_BASIC);
99 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, win,
100 efl_ui_layout_theme_set(efl_added, "win", "background", NULL)
101 );
102 efl_ui_layout_theme_get(layout, &klass, &group, &style);
103 ck_assert_str_eq(klass, "win");
104 ck_assert_str_eq(group, "background");
105 ck_assert(!style);
106}
107EFL_END_TEST
108
93void efl_ui_test_layout(TCase *tc) 109void efl_ui_test_layout(TCase *tc)
94{ 110{
95 tcase_add_test(tc, efl_ui_layout_test_property_bind); 111 tcase_add_test(tc, efl_ui_layout_test_property_bind);
96 tcase_add_test(tc, efl_ui_layout_test_layout_api_size_min); 112 tcase_add_test(tc, efl_ui_layout_test_layout_api_size_min);
97 tcase_add_test(tc, efl_ui_layout_test_layout_api_update_hints); 113 tcase_add_test(tc, efl_ui_layout_test_layout_api_update_hints);
98 tcase_add_test(tc, efl_ui_layout_test_layout_force); 114 tcase_add_test(tc, efl_ui_layout_test_layout_force);
115 tcase_add_test(tc, efl_ui_layout_test_layout_theme);
99} 116}