summaryrefslogtreecommitdiff
path: root/src/tests/elementary/elm_test_layout.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-01-24 09:52:37 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-01-24 10:24:50 +0100
commit993c843291b34dbc549ddfdad2c2ed5327a364ba (patch)
tree6274255419fbaf25104a53b7e0b1344c1d4b52ad /src/tests/elementary/elm_test_layout.c
parenteb10662030ffc6742360025ff7ca884b5d987cf1 (diff)
efl_ui_layout: use the correct object
the obejct used in D7740 have been false. Here comes the fix + a few tests. Reviewed-by: YeongJong Lee <yj34.lee@samsung.com> Differential Revision: https://phab.enlightenment.org/D7746
Diffstat (limited to '')
-rw-r--r--src/tests/elementary/elm_test_layout.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/tests/elementary/elm_test_layout.c b/src/tests/elementary/elm_test_layout.c
index bead485a03..998ec55ef2 100644
--- a/src/tests/elementary/elm_test_layout.c
+++ b/src/tests/elementary/elm_test_layout.c
@@ -2,6 +2,7 @@
2# include "elementary_config.h" 2# include "elementary_config.h"
3#endif 3#endif
4 4
5#define EFL_LAYOUT_CALC_PROTECTED
5#define EFL_ACCESS_OBJECT_BETA 6#define EFL_ACCESS_OBJECT_BETA
6#include <Elementary.h> 7#include <Elementary.h>
7#include "elm_suite.h" 8#include "elm_suite.h"
@@ -117,10 +118,49 @@ EFL_START_TEST(elm_layout_test_model_connect)
117} 118}
118EFL_END_TEST 119EFL_END_TEST
119 120
121EFL_START_TEST(efl_ui_layout_layout_api_size_min)
122{
123 Evas_Object *win;
124 Eina_Size2D res;
125
126 win = win_add(NULL, "layout", ELM_WIN_BASIC);
127 /* this is just a test to not get segfaults in those calls */
128 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, win);
129 res = efl_layout_calc_size_min(layout, EINA_SIZE2D(2, 2));
130 ck_assert_int_eq(res.w, 2);
131 ck_assert_int_eq(res.h, 2);
132}
133EFL_END_TEST
134
135EFL_START_TEST(efl_ui_layout_layout_api_update_hints)
136{
137 Evas_Object *win;
138
139 win = win_add(NULL, "layout", ELM_WIN_BASIC);
140 /* this is just a test to not get segfaults in those calls */
141 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, win);
142 efl_layout_calc_auto_update_hints_set(layout, EINA_TRUE);
143 ck_assert_int_eq(efl_layout_calc_auto_update_hints_get(layout), EINA_TRUE);
144}
145EFL_END_TEST
146
147EFL_START_TEST(efl_ui_layout_layout_force)
148{
149 Evas_Object *win;
150
151 win = win_add(NULL, "layout", ELM_WIN_BASIC);
152 /* this is just a test to not get segfaults in those calls */
153 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, win);
154 efl_layout_calc_force(layout);
155}
156EFL_END_TEST
120void elm_test_layout(TCase *tc) 157void elm_test_layout(TCase *tc)
121{ 158{
122 tcase_add_test(tc, elm_layout_test_legacy_type_check); 159 tcase_add_test(tc, elm_layout_test_legacy_type_check);
123 tcase_add_test(tc, elm_atspi_role_get); 160 tcase_add_test(tc, elm_atspi_role_get);
124 tcase_add_test(tc, elm_layout_test_swallows); 161 tcase_add_test(tc, elm_layout_test_swallows);
125 tcase_add_test(tc, elm_layout_test_model_connect); 162 tcase_add_test(tc, elm_layout_test_model_connect);
163 tcase_add_test(tc, efl_ui_layout_layout_api_size_min);
164 tcase_add_test(tc, efl_ui_layout_layout_api_update_hints);
165 tcase_add_test(tc, efl_ui_layout_layout_force);
126} 166}